glibc/sysdeps
Adhemerval Zanella 92b963699a linux: Optimize fallback 32-bit clock_getres
This patch avoid probing the __NR_clock_getttime64 syscall each time
__clock_gettime64 is issued on a kernel without 64 bit time support.
Once ENOSYS is obtained, only 32-bit clock_gettime are used.

The following snippet:

  clock_getres (CLOCK_REALTIME, &(struct timespec) { 0 });
  clock_getres (CLOCK_MONOTONIC, &(struct timespec) { 0 });
  clock_getres (CLOCK_BOOTTIME, &(struct timespec) { 0 });
  clock_getres (20, &(struct timespec) { 0 });

On a kernel without 64 bit time support issues the syscalls:

  syscall_0x196(0, 0xffb83330, [...]) = -1 ENOSYS (Function not implemented)
  clock_getres(CLOCK_REALTIME, {tv_sec=0, tv_nsec=1}) = 0
  clock_getres(CLOCK_MONOTONIC, {tv_sec=0, tv_nsec=1}) = 0
  clock_getres(CLOCK_BOOTTIME, {tv_sec=0, tv_nsec=1}) = 0

Checked on i686-linux-gnu on 4.15 kernel.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2020-01-03 11:22:07 -03:00
..
aarch64 Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
alpha Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
arm Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
csky Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
generic elf: Move vDSO setup to rtld (BZ#24967) 2020-01-03 11:22:07 -03:00
gnu Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
hppa Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
htl Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
hurd Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
i386 Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
ia64 Linux: Use system call tables during build 2020-01-02 10:18:23 +01:00
ieee754 Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
init_array Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
m68k Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
mach Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
microblaze Linux: Use system call tables during build 2020-01-02 10:18:23 +01:00
mips Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
nios2 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
nptl Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
posix Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
powerpc elf: Move vDSO setup to rtld (BZ#24967) 2020-01-03 11:22:07 -03:00
pthread Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
riscv Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
s390 Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
sh Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sparc Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
unix linux: Optimize fallback 32-bit clock_getres 2020-01-03 11:22:07 -03:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
x86 Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00
x86_64 Add libm_alias_finite for _finite symbols 2020-01-03 10:02:04 -03:00