From dbaf5693972d2cbfad0ad48b966e5693b770127e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 22 Apr 2012 00:22:47 +0200 Subject: __pthread_timedblock: add an argument for the clock id To make `__pthread_timedblock' properly measure time using the right clock, add a new argument representing the clock to use. * pthread/pt-internal.h (__pthread_timedblock): New argument CLOCK_ID. * sysdeps/l4/pt-timedblock.c (__pthread_timedblock): Likewise. * sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Likewise. * sysdeps/generic/pt-cond-timedwait.c (__pthread_cond_timedwait_internal): Pass the clock of the `pthread_cond' to `__pthread_timedblock'. * sysdeps/generic/pt-mutex-timedlock.c (__pthread_mutex_timedlock_internal): Pass CLOCK_REALTIME to `__pthread_timedblock'. * sysdeps/generic/pt-rwlock-timedrdlock.c (__pthread_rwlock_timedrdlock_internal): Likewise. * sysdeps/generic/pt-rwlock-timedwrlock.c (__pthread_rwlock_timedwrlock_internal): Likewise. * sysdeps/generic/sem-timedwait.c (__sem_timedwait_internal): Likewise. --- sysdeps/mach/pt-timedblock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/mach/pt-timedblock.c') diff --git a/sysdeps/mach/pt-timedblock.c b/sysdeps/mach/pt-timedblock.c index 6f54726..88beaa2 100644 --- a/sysdeps/mach/pt-timedblock.c +++ b/sysdeps/mach/pt-timedblock.c @@ -30,7 +30,8 @@ /* Block THREAD. */ error_t __pthread_timedblock (struct __pthread *thread, - const struct timespec *abstime) + const struct timespec *abstime, + clockid_t clock_id) { error_t err; mach_msg_header_t msg; -- cgit v1.2.3