annotate Paper/src/workerRun.cbc @ 14:393c839f987b default tip

DONE
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Sat, 08 Jan 2022 12:41:39 +0900
parents c59202657321
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 __code getTaskCPUWorker(struct CPUWorker* cpuWorker, struct Context* task, struct Worker* worker) {
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 if (!task) {
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 goto worker->shutdown(); // end thread
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 }
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 task->worker = worker;
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 enum Code taskCg = task->next;
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 task->next = C_odgCommitCPUWorker; // commit outputDG after task exec
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 goto meta(task, taskCg); // switch task context
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 }