comparison 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
comparison
equal deleted inserted replaced
493:82f0c49750f1 494:d8b2036c6942
1 #include "../../../context.h"
2
3 __code initBuffer(__code next(struct Buffer* output, ...)) {
4 struct Buffer* output = *O_output;
5 goto next(output, ...);
6 }
7
8 __code initBuffer_stub(struct Context* context) {
9 struct Buffer** O_output = (struct Buffer**)&context->data[context->odg];
10 goto initBuffer(context,
11 context->next,
12 O_output);
13 }