changeset 27:763cf84d2dc7

fixed a bug that waited for wrong cond variable
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 28 Feb 2009 04:21:31 +0900
parents c6264c15f39d
children 97c820e30737
files recpt1/recpt1.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/recpt1/recpt1.c	Sat Feb 28 00:25:25 2009 +0900
+++ b/recpt1/recpt1.c	Sat Feb 28 04:21:31 2009 +0900
@@ -151,7 +151,7 @@
 
     /* wait while queue is empty */
     while(p_queue->num_used == 0) {
-        pthread_cond_timedwait(&p_queue->cond_avail,
+        pthread_cond_timedwait(&p_queue->cond_used,
                                &p_queue->mutex, &spec);
         if(f_exit) {
             pthread_mutex_unlock(&p_queue->mutex);