Mercurial > hg > Gears > GearsAgda
view src/parallel_execution/dependency.c @ 261:0cd43e22aee1
merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 28 Jan 2017 15:48:54 +0900 |
parents | af4dec989aa1 |
children |
line wrap: on
line source
#include <stdio.h> #include "context.h" #include "origin_cs.h" __code meta_waitFor(struct Context* context, struct Queue* queue, enum Code next) { context->data[D_Queue] = (union Data *)queue; goto (context->code[next])(context); } __code waitFor1(struct Context* context, struct Task* master, struct Task* slave, struct Element* element) { element->data = (union Data *)slave; // enqueue waitMe goto meta_waitFor(context, /*master->waitMe*/ NULL , /*PutQueue1*/ C_waitFor1); } __code waitFor1_stub(struct Context* context) { // next think } //__code waitFor2(struct Context* context, struct Task* master, struct Task* slave, struct Element* element) { // element->task = master; // task->next = context->next; // // enqueue waitI // goto meta_waitFor(context, task->waitI, PutQueue1); //} // //__code waitFor2_stub(struct Context* context) { // // next think //}