summaryrefslogtreecommitdiff
path: root/sysdeps/generic/pt-cond-timedwait.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/pt-cond-timedwait.c')
-rw-r--r--sysdeps/generic/pt-cond-timedwait.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/generic/pt-cond-timedwait.c b/sysdeps/generic/pt-cond-timedwait.c
index 483f277..56eb1ec 100644
--- a/sysdeps/generic/pt-cond-timedwait.c
+++ b/sysdeps/generic/pt-cond-timedwait.c
@@ -46,6 +46,7 @@ __pthread_cond_timedwait_internal (pthread_cond_t *cond,
{
error_t err;
int canceltype;
+ clockid_t clock_id = __pthread_default_condattr.clock;
void cleanup (void *arg)
{
@@ -68,6 +69,8 @@ __pthread_cond_timedwait_internal (pthread_cond_t *cond,
/* Add ourselves to the list of waiters. */
__pthread_spin_lock (&cond->__lock);
__pthread_enqueue (&cond->__queue, self);
+ if (cond->__attr)
+ clock_id = cond->__attr->clock;
__pthread_spin_unlock (&cond->__lock);
__pthread_mutex_unlock (mutex);
@@ -79,7 +82,7 @@ __pthread_cond_timedwait_internal (pthread_cond_t *cond,
if (abstime)
{
- err = __pthread_timedblock (self, abstime);
+ err = __pthread_timedblock (self, abstime, clock_id);
if (err)
/* We timed out. We may need to disconnect ourself from the
waiter queue.