diff Paper/src/workerRun.cbc @ 0:c59202657321

init
author soto <soto@cr.ie.u-ryukyu.ac.jp>
date Tue, 02 Nov 2021 06:55:58 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/workerRun.cbc	Tue Nov 02 06:55:58 2021 +0900
@@ -0,0 +1,9 @@
+__code getTaskCPUWorker(struct CPUWorker* cpuWorker, struct Context* task, struct Worker* worker) {
+    if (!task) {
+        goto worker->shutdown(); // end thread
+    }
+    task->worker = worker;
+    enum Code taskCg = task->next;
+    task->next = C_odgCommitCPUWorker; // commit outputDG after task exec
+    goto meta(task, taskCg); // switch task context
+}