+2011-09-06 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
+ use gettimeofday vsyscall, just call gettimeofday.
+
2011-09-05 David S. Miller <davem@davemloft.net>
* sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
-/* 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 <structsem.h>
-
-/* For the calculation see asm/vsyscall.h. */
-#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000
-
.text
.globl sem_timedwait
addq $1, NWAITERS(%r12)
7: xorl %esi, %esi
- movq %rsp, %rdi
- movq $VSYSCALL_ADDR_vgettimeofday, %rax
- callq *%rax
+ movq %rsp,%rdi
+ /* 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