From a8509ca540427502bd955f35296ff7b727c7a8a1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 27 May 2011 16:09:52 -0400 Subject: Use getcpu definition from vDSO on x86-64 --- sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S') 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 -- cgit v1.2.3