aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.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/lowlevellock.S
parente38ba7ab6a56d53bde4fcff250f6928fb473bc3c (diff)
downloadglibc-9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e.zip
glibc-9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e.tar.gz
glibc-9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e.tar.bz2
Remove gettimeofday vsyscall use from x86-86 libpthread
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S18
1 files changed, 7 insertions, 11 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 3195db2..018da0c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-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.
@@ -68,10 +68,6 @@
#endif
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
-
.globl __lll_lock_wait_private
.type __lll_lock_wait_private,@function
.hidden __lll_lock_wait_private
@@ -250,10 +246,9 @@ __lll_timedlock_wait:
/* Get current time. */
movq %rsp, %rdi
xorl %esi, %esi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- /* This is a regular function call, all caller-save registers
- might be clobbered. */
- 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
@@ -402,8 +397,9 @@ __lll_timedwait_tid:
/* Get current time. */
2: 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