This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v4 06/24] sysdeps/timespec_get: Use clock_gettime64 if avaliable
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: <libc-alpha at sourceware dot org>, <arnd at arndb dot de>, <adhemerval dot zanella at linaro dot org>, <fweimer at redhat dot com>, <palmer at sifive dot com>, <macro at wdc dot com>, <zongbox at gmail dot com>, <alistair23 at gmail dot com>
- Date: Mon, 12 Aug 2019 19:46:37 +0000
- Subject: Re: [RFC v4 06/24] sysdeps/timespec_get: Use clock_gettime64 if avaliable
- Ironport-sdr: T2BtJURofn8JB8aua+H+jX+GgBxXGcdY8tp9alqusnuRcQmmPQ5F5WeOz64d4bjGlwxUeVX/8O bfs6JbGJS5NC/jFAyW+RZPSlGgGx6JfeShfkbelvhNB+jj8lpUmx29xRKdwSF3N7upp3FLgiDz ZjN27HL8WcWKStXwpZU87uO+14zv8rKvOcuAcoCAvhojybfrFcpQYMkSP6YYbMBFZWTs30ilM1 157Hp6R+2JgsJhnRjSdvFKXfFX6PnQVbzcGvd54APkGeV/uwKTR191rdukMXHS9ichTJ13qLhh sG4=
- Ironport-sdr: OFUxOWAn9wYeaqh7dcVdijeNGTt7zzgsWTPuU9i9x5cgq/jeF5IcFAN8cFsiYaZrMqJKdDt31U zdXZugpxAVGV3tAVjaMj0Ws0euVQqWvNCcm74kZNhO7iKlqa4aOo8XyyUW7pDr+/VRZCtDTQtn vLylzeNovZfVXuT+VH7TNElTYJaGHeyN/FXBd5RTiivoxiMQiYgBCVwpvSyfm2iAiTqeWw0b9H yoQ4Keh9ub4ND7RK6Iz7YWn+m5fukI2eOexDFs9duQE9ULYQMNzd5PkgoI4YzwJQZXXaRc8lD9 wOM=
- References: <cover.1565398513.git.alistair.francis@wdc.com> <3ee6c1e52cbefe6f6dbd7aef423f13607ff50402.1565398513.git.alistair.francis@wdc.com>
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