Fix bug in the example.

This commit is contained in:
Patrick Pelissier committed 2017-03-17 22:13:37 +01:00
1 parent 56453a518d
commit 599dc30b3c
1 file changed
+3 -6
+3 -6
View File
@@ -137,8 +137,7 @@ static void thread2 (void *arg)
(void) arg;
while (continue_threading_g) {
shared_bigdata_t ptr;
shared_bigdata_init (ptr);
buffer_bigdata_pop(&ptr, buf_t1tot2);
buffer_bigdata_pop(&ptr, buf_t1tot2); // NOTE: Pop has been configured to init ptr
perform_computation2(*shared_bigdata_ref(ptr));
shared_bigdata_clear(ptr);
}
@@ -148,8 +147,7 @@ static void thread3 (void *arg)
(void) arg;
while (continue_threading_g) {
shared_bigdata_t ptr;
shared_bigdata_init (ptr);
buffer_bigdata_pop(&ptr, buf_t1tot3);
buffer_bigdata_pop(&ptr, buf_t1tot3); // NOTE: Pop has been configured to init ptr
perform_computation3(*shared_bigdata_ref(ptr));
buffer_bigdata_push(buf_t3tot4, ptr);
shared_bigdata_clear(ptr);
@@ -160,8 +158,7 @@ static void thread4 (void *arg)
(void) arg;
while (continue_threading_g) {
shared_bigdata_t ptr;
shared_bigdata_init (ptr);
buffer_bigdata_pop(&ptr, buf_t3tot4);
buffer_bigdata_pop(&ptr, buf_t3tot4); // NOTE: Pop has been configured to init ptr
perform_computation4(*shared_bigdata_ref(ptr));
shared_bigdata_clear(ptr);
}