[RFC v4 06/24] sysdeps/timespec_get: Use clock_gettime64 if avaliable

Joseph Myers joseph@codesourcery.com
Mon Aug 12 19:46:00 GMT 2019


On Fri, 9 Aug 2019, Alistair Francis wrote:

> diff --git a/sysdeps/unix/sysv/linux/timespec_get.c b/sysdeps/unix/sysv/linux/timespec_get.c
> index 52080ddf08a..97ef9c5f799 100644
> --- a/sysdeps/unix/sysv/linux/timespec_get.c
> +++ b/sysdeps/unix/sysv/linux/timespec_get.c
> @@ -24,6 +24,58 @@
>  #endif
>  #include <sysdep-vdso.h>
>  
> +int
> +__timespec_get (struct timespec *ts, int base)
> +{
> +#ifdef __ASSUME_TIME64_SYSCALLS
> +  return INTERNAL_VSYSCALL (clock_gettime64, err, 2, CLOCK_REALTIME, ts);
> +#else

This has the usual problems with missing conversions.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list