Mercurial > hg > Members > Moririn
diff src/parallel_execution/TaskManagerImpl.cbc @ 462:8d7e5d48cad3
Running CPU examples
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Dec 2017 22:05:08 +0900 |
parents | 6b71cf5b1c22 |
children | ac244346c85d |
line wrap: on
line diff
--- a/src/parallel_execution/TaskManagerImpl.cbc Wed Dec 20 17:54:15 2017 +0900 +++ b/src/parallel_execution/TaskManagerImpl.cbc Wed Dec 20 22:05:08 2017 +0900 @@ -1,8 +1,8 @@ #include "../context.h" -#include "./TaskManager.h" -#include "./Iterator.h" -#include "./Queue.h" -#include "./Worker.h" +#include "TaskManager.h" +#include "Iterator.h" +#include "Queue.h" +#include "Worker.h" #include <stdio.h> #include <unistd.h> @@ -201,21 +201,9 @@ goto meta(context, next); } -__code shutdownTaskManagerImpl_stub(struct Context* context) { - TaskManagerImpl* taskManagerImpl = (TaskManagerImpl*)GearImpl(context, TaskManager, taskManager); - goto shutdownTaskManagerImpl(context, - taskManagerImpl, - Gearef(context, TaskManager)->next); -} - -__code shutdownTaskManagerImpl1(TaskManagerImpl* taskManager) { +__code shutdownTaskManagerImpl1(struct TaskManagerImpl* taskManager) { int i = taskManager->loopCounter->i; pthread_join(taskManager->workers[i]->thread, NULL); taskManager->loopCounter->i++; goto meta(context, C_shutdownTaskManagerImpl); } - -__code shutdownTaskManagerImpl1_stub(struct Context* context) { - TaskManagerImpl* taskManagerImpl = (TaskManagerImpl*)GearImpl(context, TaskManager, taskManager); - goto shutdownTaskManagerImpl1(context, taskManagerImpl); -}