Mercurial > hg > Members > Moririn
diff src/parallel_execution/examples/boundedBuffer/initQueue.cbc @ 493:82f0c49750f1
Add codeGear for boundedBuffer example
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 01:36:18 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/parallel_execution/examples/boundedBuffer/initQueue.cbc Sun Dec 31 01:36:18 2017 +0900 @@ -0,0 +1,13 @@ +#include "../../../context.h" + +__code initQueue(__code next(struct Queue* output, ...)) { + struct Queue* output = *O_output; + goto next(output, ...); +} + +__code initQueue_stub(struct Context* context) { + struct Queue** O_output = (struct Queue**)&context->data[context->odg]; + goto initQueue(context, + context->next, + O_output); +}