Mercurial > hg > GearsTemplate
changeset 184:21840c7fb309
merge
author | mir3636 |
---|---|
date | Thu, 15 Dec 2016 17:41:00 +0900 |
parents | dec50dd624c7 |
children | 247a2c4a8908 |
files | src/parallel_execution/TaskManager.c src/parallel_execution/context.c src/parallel_execution/context.h |
diffstat | 3 files changed, 11 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/TaskManager.c Thu Dec 15 17:31:38 2016 +0900 +++ b/src/parallel_execution/TaskManager.c Thu Dec 15 17:41:00 2016 +0900 @@ -12,6 +12,7 @@ taskManager->taskManager = (union Data*)taskManagerImpl; taskManager->spawn = C_spawnTaskManager; taskManager->shutdown = C_shutdownTaskManager; + taskManager->deadLockDetected = C_deadLockDetected; return (union Data*)(taskManager); }
--- a/src/parallel_execution/context.c Thu Dec 15 17:31:38 2016 +0900 +++ b/src/parallel_execution/context.c Thu Dec 15 17:41:00 2016 +0900 @@ -127,7 +127,6 @@ context->code[C_isEmptySynchronizedQueue] = isEmptySynchronizedQueue_stub; context->code[C_spawnTaskManager] = spawnTaskManager_stub; - context->code[C_taskSendTaskManager] = taskSendTaskManager_stub; context->code[C_shutdownTaskManager] = shutdownTaskManager_stub; /* context->code[Delete] = delete_stub; */
--- a/src/parallel_execution/context.h Thu Dec 15 17:31:38 2016 +0900 +++ b/src/parallel_execution/context.h Thu Dec 15 17:41:00 2016 +0900 @@ -111,10 +111,6 @@ C_getRedBlackTree, C_removeRedBlackTree, C_clearRedBlackTree, - C_QueueTest1, - C_QueueTest2, - C_QueueTest3, - C_QueueTest4, SpawnTask, Twice, StartTime, @@ -135,8 +131,6 @@ D_Stack, D_RedBlackTree, D_Tree, - D_TaskManager, - D_TaskManagerImpl, D_Task, D_Traverse, D_RotateTree, @@ -181,12 +175,14 @@ int numWorker; enum Code spawn; enum Code shutdown; + enum Code deadLockDetected; + enum Code next; struct Worker* workers; - } taskManager; + } TaskManager; struct TaskManagerImpl { - struct Queue *activeQueue; - struct Queue *waitQueue; - } taskManagerImpl; + struct Queue* activeQueue; + struct Queue* taskQueue; + } TaskManagerImpl; struct Worker { int id; struct Context* contexts; @@ -195,7 +191,7 @@ enum Code taskRecive; enum Code shutdown; struct Queue* tasks; - } worker; + } Worker; #ifdef USE_CUDA struct CudaTask { CUdevice device; @@ -209,7 +205,7 @@ enum Code code; enum Code next; struct Queue* args; - } main; + } struct Task { enum Code code; struct Queue* dataGears; @@ -225,11 +221,11 @@ enum Code take; enum Code isEmpty; enum Code next; - } queue; + } Queue; struct SingleLinkedQueue { struct Element* top; struct Element* last; - } singleLinkedQueue; + } SingleLinkedQueue; // Stack Interface struct Stack { union Data* stack;