diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/shm_ap_rbuff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/shm_ap_rbuff.c b/src/lib/shm_ap_rbuff.c index 666e053f..a855ed8f 100644 --- a/src/lib/shm_ap_rbuff.c +++ b/src/lib/shm_ap_rbuff.c @@ -259,9 +259,9 @@ struct rb_entry * shm_ap_rbuff_read(struct shm_ap_rbuff * rb) return NULL; pthread_cleanup_push((void(*)(void *))pthread_mutex_unlock, - (void*) rb->shm_mutex); - + (void *) rb->shm_mutex); pthread_mutex_lock(rb->shm_mutex); + while(shm_rbuff_empty(rb)) pthread_cond_wait(rb->work, rb->shm_mutex); |