aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-27 16:09:52 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-27 16:09:52 -0400
commita8509ca540427502bd955f35296ff7b727c7a8a1 (patch)
tree964578fc90ec1cdd1b6af5b04dc0a4dd12fa266e /sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
parentfdc2fefe46db79f0a19f690531cd775fbbc2740f (diff)
downloadglibc-a8509ca540427502bd955f35296ff7b727c7a8a1.tar
glibc-a8509ca540427502bd955f35296ff7b727c7a8a1.tar.gz
glibc-a8509ca540427502bd955f35296ff7b727c7a8a1.tar.bz2
glibc-a8509ca540427502bd955f35296ff7b727c7a8a1.zip
Use getcpu definition from vDSO on x86-64
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
index a950990627..8ec7d3fcd2 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
+++ b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,12 @@ ENTRY (sched_getcpu)
movl $VGETCPU_CACHE_OFFSET, %edx
addq %fs:0, %rdx
+#ifdef SHARED
+ movq __vdso_getcpu(%rip), %rax
+ PTR_DEMANGLE (%rax)
+#else
movq $VSYSCALL_ADDR_vgetcpu, %rax
+#endif
callq *%rax
cmpq $-4095, %rax