summaryrefslogtreecommitdiff
path: root/src/lib/shm_rbuff_pthr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/shm_rbuff_pthr.c')
-rw-r--r--src/lib/shm_rbuff_pthr.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/lib/shm_rbuff_pthr.c b/src/lib/shm_rbuff_pthr.c
index b1b9bd55..f630d344 100644
--- a/src/lib/shm_rbuff_pthr.c
+++ b/src/lib/shm_rbuff_pthr.c
@@ -114,12 +114,7 @@ int shm_rbuff_write_b(struct shm_rbuff * rb,
while (!shm_rbuff_free(rb)
&& ret != -ETIMEDOUT
&& !(*rb->acl & ACL_FLOWDOWN)) {
- if (abstime != NULL)
- ret = -pthread_cond_timedwait(rb->del,
- rb->lock,
- abstime);
- else
- ret = -pthread_cond_wait(rb->del, rb->lock);
+ ret = -__timedwait(rb->del, rb->lock, abstime);
#ifdef HAVE_ROBUST_MUTEX
if (ret == -EOWNERDEAD)
pthread_mutex_consistent(rb->lock);
@@ -204,12 +199,7 @@ ssize_t shm_rbuff_read_b(struct shm_rbuff * rb,
while (shm_rbuff_empty(rb) &&
idx != -ETIMEDOUT &&
check_rb_acl(rb) == -EAGAIN) {
- if (abstime != NULL)
- idx = -pthread_cond_timedwait(rb->add,
- rb->lock,
- abstime);
- else
- idx = -pthread_cond_wait(rb->add, rb->lock);
+ idx = -__timedwait(rb->add, rb->lock, abstime);
#ifdef HAVE_ROBUST_MUTEX
if (idx == -EOWNERDEAD)
pthread_mutex_consistent(rb->lock);