comparison 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
comparison
equal deleted inserted replaced
51:4302e2fb7019 52:83ee9c75115a
47 47
48 context->data[Queue] = context->heap; 48 context->data[Queue] = context->heap;
49 context->heap += sizeof(struct Queue); 49 context->heap += sizeof(struct Queue);
50 context->data[Queue]->queue.first = 0; 50 context->data[Queue]->queue.first = 0;
51 pthread_mutex_init(&context->data[Queue]->queue.mutex, NULL); 51 pthread_mutex_init(&context->data[Queue]->queue.mutex, NULL);
52 pthread_cond_init(&context->data[Queue]->queue.cond, NULL);
52 53
53 context->dataNum = Queue; 54 context->dataNum = Queue;
54 } 55 }