Mercurial > hg > GearsTemplate
changeset 495:2e7ea81e5943
Work BoundedBuffer if singlethread
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 04:36:20 +0900 |
parents | d8b2036c6942 |
children | 809974b25ecb 8e133a3938c0 |
files | src/parallel_execution/examples/boundedBuffer/BoundedBuffer.cbc |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/examples/boundedBuffer/BoundedBuffer.cbc Sun Dec 31 02:40:08 2017 +0900 +++ b/src/parallel_execution/examples/boundedBuffer/BoundedBuffer.cbc Sun Dec 31 04:36:20 2017 +0900 @@ -33,7 +33,7 @@ element->next = NULL; struct Element* last = buffer->last; last->next = element; - printf("put\n"); + buffer->last = element; struct Semaphore* sem = buffer->lock; goto sem->v(putBoundedBuffer3); } @@ -60,6 +60,7 @@ struct Element* top = buffer->top; struct Element* nextElement = top->next; data = nextElement->data; + *O_data =data; buffer->top = nextElement; struct Semaphore* sem = buffer->lock; goto sem->v(takeBoundedBuffer3);