diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.com> | 2015-04-22 14:21:39 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2015-06-09 14:56:21 -0300 |
commit | dd26c44403582fdf10d663170f947dfe4b3207a0 (patch) | |
tree | 4acc8bf62d49bf27809c35515c1982cff389be04 /sysdeps/unix/sysv/linux/sched_getcpu.c | |
parent | 2a523216d5dc973d8bf91a00f00b70b7df42b91d (diff) | |
download | glibc-dd26c44403582fdf10d663170f947dfe4b3207a0.tar.gz glibc-dd26c44403582fdf10d663170f947dfe4b3207a0.tar.xz glibc-dd26c44403582fdf10d663170f947dfe4b3207a0.zip |
Consolidate sched_getcpu
This patch consolidates the sched_getcpu implementations across all arches (except tile, which requires its own). This patch removes the powerpc, x86_64 and x32 specific files and change the default linux one to use INLINE_VSYSCALL where possible (for ports that implements it).
Diffstat (limited to 'sysdeps/unix/sysv/linux/sched_getcpu.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/sched_getcpu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sched_getcpu.c b/sysdeps/unix/sysv/linux/sched_getcpu.c index 09f0816896..a485d3680e 100644 --- a/sysdeps/unix/sysv/linux/sched_getcpu.c +++ b/sysdeps/unix/sysv/linux/sched_getcpu.c @@ -19,13 +19,17 @@ #include <sched.h> #include <sysdep.h> +#ifdef HAVE_GETCPU_VSYSCALL +# define HAVE_VSYSCALL +#endif +#include <sysdep-vdso.h> int sched_getcpu (void) { #ifdef __NR_getcpu unsigned int cpu; - int r = INLINE_SYSCALL (getcpu, 3, &cpu, NULL, NULL); + int r = INLINE_VSYSCALL (getcpu, 3, &cpu, NULL, NULL); return r == -1 ? r : cpu; #else |