changeset 885:12cf168d6d3f

...
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 25 Jan 2021 16:07:03 +0900
parents 084639a31aaf
children ece622492758
files src/parallel_execution/MCTaskManagerImpl.cbc src/parallel_execution/ModelChecking/MCWorker.cbc
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/MCTaskManagerImpl.cbc	Sun Jan 24 18:34:37 2021 +0900
+++ b/src/parallel_execution/MCTaskManagerImpl.cbc	Mon Jan 25 16:07:03 2021 +0900
@@ -124,7 +124,7 @@
       // start model checker
       // we should goto odgCommitMCWorker foreach mctask
       Gearef(context, Worker)->worker = (union Data*)taskManagerImpl->workers[0];
-      goto startModelChecker(worker);
+      goto startModelChecker(Gearef(context, Worker)->worker);
     }
     task->taskManager = taskManager;
     if (task->idgCount == 0) {
@@ -188,7 +188,8 @@
     }
     int i = taskManager->loopCounter;
     if (i < taskManager->numWorker) {
-        struct Queue* tasks = taskManager->workers[i]->tasks;
+        int workerId = taskManager->sendCPUWorkerIndex;
+        struct Queue* tasks = taskManager->workers[workerId]->tasks;
         goto tasks->put(NULL, shutdownMCTaskManagerImpl1);
     }
 
--- a/src/parallel_execution/ModelChecking/MCWorker.cbc	Sun Jan 24 18:34:37 2021 +0900
+++ b/src/parallel_execution/ModelChecking/MCWorker.cbc	Mon Jan 25 16:07:03 2021 +0900
@@ -36,7 +36,7 @@
 
 __code startModelChecker(struct MCWorker* worker) {
     struct Queue* mcQueue =  worker->mcQueue;
-    goto mcQueue->take(meta);
+    goto takeSingleLinkedQueue(mcQueue, taskReceiveMCWorker);
 }
 
 __code getTaskMCWorker(struct MCWorker* mcWorker, struct Context* task, struct Worker* worker) {