From a77d3c17dc6517636c1cf6ab9c6bb8c257772354 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 6 Sep 2011 21:34:11 -0400 Subject: Don't unconditionally use clock_gettime vsyscall on x86-64 --- sysdeps/unix/sysv/linux/x86_64/clock_gettime.c | 10 ++++++++++ sysdeps/unix/sysv/linux/x86_64/sysdep.h | 9 +++------ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/x86_64/clock_gettime.c (limited to 'sysdeps/unix/sysv/linux/x86_64') diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c new file mode 100644 index 0000000000..9d6cd238de --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c @@ -0,0 +1,10 @@ +#include "bits/libc-vdso.h" + +#ifdef SHARED +# define SYSCALL_GETTIME(id, tp) \ + (*__vdso_clock_gettime) (id, tp) +# define INTERNAL_GETTIME(id, tp) \ + (*__vdso_clock_gettime) (id, tp) +#endif + +#include "../clock_gettime.c" diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index 2b9ea85d8e..a9821dc0a8 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2005, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2001-2005, 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 @@ -279,8 +279,8 @@ if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ { \ iserr: \ - __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \ - sc_ret = -1L; \ + __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \ + sc_ret = -1L; \ } \ out: \ sc_ret; \ @@ -304,9 +304,6 @@ v_ret; \ }) -/* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 - # else # define INLINE_VSYSCALL(name, nr, args...) \ INLINE_SYSCALL (name, nr, ##args) -- cgit 1.4.1