Mercurial > hg > Members > Moririn
diff src/parallel_execution/examples/boundedBuffer/initBuffer.cbc @ 494:d8b2036c6942
BoundedBuffer implments Buffer interface
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 02:40:08 +0900 |
parents | src/parallel_execution/examples/boundedBuffer/initQueue.cbc@82f0c49750f1 |
children | 62a77785cb2b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/parallel_execution/examples/boundedBuffer/initBuffer.cbc Sun Dec 31 02:40:08 2017 +0900 @@ -0,0 +1,13 @@ +#include "../../../context.h" + +__code initBuffer(__code next(struct Buffer* output, ...)) { + struct Buffer* output = *O_output; + goto next(output, ...); +} + +__code initBuffer_stub(struct Context* context) { + struct Buffer** O_output = (struct Buffer**)&context->data[context->odg]; + goto initBuffer(context, + context->next, + O_output); +}