diff src/synchronizedQueue/synchronizedQueueContext.c @ 52:83ee9c75115a

Add pthread_cond_wait & pthread_cond_signal to synchronizedQueue.c
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Tue, 02 Jun 2015 14:17:07 +0900
parents 46917f503bce
children 4283b87ddbf4
line wrap: on
line diff
--- a/src/synchronizedQueue/synchronizedQueueContext.c	Mon May 25 01:53:02 2015 +0900
+++ b/src/synchronizedQueue/synchronizedQueueContext.c	Tue Jun 02 14:17:07 2015 +0900
@@ -49,6 +49,7 @@
     context->heap          += sizeof(struct Queue);
     context->data[Queue]->queue.first = 0;
     pthread_mutex_init(&context->data[Queue]->queue.mutex, NULL);
+    pthread_cond_init(&context->data[Queue]->queue.cond, NULL);
 
     context->dataNum = Queue;
 }