diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-15 21:35:10 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-22 12:09:52 -0300 |
commit | 283c6ebd5a71330eb37c8d08054f1036eeb544dc (patch) | |
tree | dcbf21bfb79124de4152b4ce15cda24e594daa95 | |
parent | 4c3df0eba5e8fe98f0de917ade9b2ebba6951c5f (diff) | |
download | glibc-283c6ebd5a71330eb37c8d08054f1036eeb544dc.tar glibc-283c6ebd5a71330eb37c8d08054f1036eeb544dc.tar.gz glibc-283c6ebd5a71330eb37c8d08054f1036eeb544dc.tar.bz2 glibc-283c6ebd5a71330eb37c8d08054f1036eeb544dc.zip |
linux: Remove supports_time64 () from clock_getres
It breaks the usage case of live migration like CRIU or similar.
The performance drawback is it would require an extra syscall
on older kernels without 64-bit time support.
Checked on i686-linux-gnu on a 4.15 kernel and on a 5.11 kernel
(with and without --enable-kernel=5.1) and on x86_64-linux-gnu.
Reviewed-by: Lukasz Majewski <lukma@denx.de>
-rw-r--r-- | sysdeps/unix/sysv/linux/clock_getres.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c index a9edec93e6..83f0593074 100644 --- a/sysdeps/unix/sysv/linux/clock_getres.c +++ b/sysdeps/unix/sysv/linux/clock_getres.c @@ -21,7 +21,6 @@ #include <time.h> #include <sysdep-vdso.h> -#include <time64-support.h> #include <shlib-compat.h> #include <kernel-features.h> @@ -34,19 +33,14 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res) #ifndef __NR_clock_getres_time64 # define __NR_clock_getres_time64 __NR_clock_getres #endif - if (supports_time64 ()) - { + #ifdef HAVE_CLOCK_GETRES64_VSYSCALL - r = INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res); + r = INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res); #else - r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res); + r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res); #endif - - if (r == 0 || errno != ENOSYS) - return r; - - mark_time64_unsupported (); - } + if (r == 0 || errno != ENOSYS) + return r; #ifndef __ASSUME_TIME64_SYSCALLS /* Fallback code that uses 32-bit support. */ |