* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
use gettimeofday vsyscall, just call gettimeofday.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+ Simplify __vdso_clock_gettime use.
2011-09-05 David S. Miller <davem@davemloft.net>
-/* 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.
#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
/* 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
/* 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
-/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2011=2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
orl $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg
#endif
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.globl __lll_robust_lock_wait
.type __lll_robust_lock_wait,@function
/* 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
#include <kernel-features.h>
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.text
movq __vdso_clock_gettime@GOTPCREL(%rip), %rax
movq (%rax), %rax
PTR_DEMANGLE (%rax)
- jz 26f
call *%rax
- jmp 27f
-# endif
-26: movl $__NR_clock_gettime, %eax
+# else
+ movl $__NR_clock_gettime, %eax
syscall
-27:
+# endif
# ifndef __ASSUME_POSIX_TIMERS
cmpq $-ENOSYS, %rax
je 19f
# else
leaq 24(%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 40(%rsp), %rax
/* clock_gettime not available. */
19: leaq 32(%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 40(%rsp), %rax
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-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.
#include <pthread-errnos.h>
#include <kernel-features.h>
-
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.text
.globl pthread_rwlock_timedrdlock
/* 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
-/* 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.
#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
/* 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