about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-07 00:14:06 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-07 00:14:06 -0400
commit9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e (patch)
treecc1249b28b4a809ce87d788c0ea23e6b5b8b5475 /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
parente38ba7ab6a56d53bde4fcff250f6928fb473bc3c (diff)
downloadglibc-9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e.tar.gz
glibc-9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e.tar.xz
glibc-9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e.zip
Remove gettimeofday vsyscall use from x86-86 libpthread
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S12
1 files changed, 5 insertions, 7 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 6ed8b49bd6..16bf9203a7 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -23,10 +24,6 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 
-
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday	0xffffffffff600000
-
 	.text
 
 	.globl	pthread_rwlock_timedwrlock
@@ -120,8 +117,9 @@ pthread_rwlock_timedwrlock:
 	/* Get current time.  */
 	movq	%rsp, %rdi
 	xorl	%esi, %esi
-	movq	$VSYSCALL_ADDR_vgettimeofday, %rax
-	callq	*%rax
+	/* This call works because we directly jump to a system call entry
+	   which preserves all the registers.  */
+	call	JUMPTARGET(__gettimeofday)
 
 	/* Compute relative timeout.  */
 	movq	8(%rsp), %rax