diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-09-07 00:14:06 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-09-07 00:14:06 -0400 |
commit | 9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e (patch) | |
tree | cc1249b28b4a809ce87d788c0ea23e6b5b8b5475 /nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S | |
parent | e38ba7ab6a56d53bde4fcff250f6928fb473bc3c (diff) |
Remove gettimeofday vsyscall use from x86-86 libpthread
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S index 48ea8b967e..d11b29746a 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S @@ -26,9 +26,6 @@ #include <kernel-features.h> -/* For the calculation see asm/vsyscall.h. */ -#define VSYSCALL_ADDR_vgettimeofday 0xffffffffff600000 - .text @@ -453,13 +450,11 @@ __pthread_cond_timedwait: 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 @@ -473,8 +468,9 @@ __pthread_cond_timedwait: # 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 @@ -611,8 +607,9 @@ __pthread_cond_timedwait: /* 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 |