about summary refs log tree commit diff
path: root/nptl/pthread_cond_timedwait.c
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2010-03-24 14:46:03 -0700
committerUlrich Drepper <drepper@redhat.com>2010-03-24 14:46:03 -0700
commit7749bf5fe6ac0464db10a3a17a31121517f92530 (patch)
treee1579c4098b38ae2bb2a4bb0f7ab781cf44ae875 /nptl/pthread_cond_timedwait.c
parent7d9335ecd7ddd16bcbcfcc0f9cc1f0b5d392f849 (diff)
downloadglibc-7749bf5fe6ac0464db10a3a17a31121517f92530.tar.gz
glibc-7749bf5fe6ac0464db10a3a17a31121517f92530.tar.xz
glibc-7749bf5fe6ac0464db10a3a17a31121517f92530.zip
Enable common version of pthread_cond_timedwait to use clock_gettime in VDSO
Diffstat (limited to 'nptl/pthread_cond_timedwait.c')
-rw-r--r--nptl/pthread_cond_timedwait.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c
index 9d268e911e..7278ec45b0 100644
--- a/nptl/pthread_cond_timedwait.c
+++ b/nptl/pthread_cond_timedwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
 
@@ -27,6 +27,14 @@
 
 #include <shlib-compat.h>
 
+#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
+# undef INTERNAL_VSYSCALL
+# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
+# undef INLINE_VSYSCALL
+# define INLINE_VSYSCALL INLINE_SYSCALL
+#else
+# include <bits/libc-vdso.h>
+#endif
 
 /* Cleanup handler, defined in pthread_cond_wait.c.  */
 extern void __condvar_cleanup (void *arg)
@@ -102,7 +110,7 @@ __pthread_cond_timedwait (cond, mutex, abstime)
 #ifdef __NR_clock_gettime
 	INTERNAL_SYSCALL_DECL (err);
 	int ret;
-	ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
+	ret = INTERNAL_VSYSCALL (clock_gettime, err, 2,
 				(cond->__data.__nwaiters
 				 & ((1 << COND_NWAITERS_SHIFT) - 1)),
 				&rt);