view paper/src/workerRun.cbc @ 11:831316a767e8

add hoare figure
author ryokka
date Mon, 10 Feb 2020 14:20:21 +0900
parents c7acb9211784
children
line wrap: on
line source

__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
}