diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2019-07-15 16:30:59 -0700 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2019-12-04 09:43:40 -0800 |
commit | ec138c67cbda8b5826a0a2a7ba456408117996dc (patch) | |
tree | 91a3a45ded96f18ea49cde5b76bde4d219fe4436 /include | |
parent | f6fbce7dd72145ed9272ac8ef3ea6123c390a72b (diff) | |
download | glibc-ec138c67cbda8b5826a0a2a7ba456408117996dc.tar.gz glibc-ec138c67cbda8b5826a0a2a7ba456408117996dc.tar.xz glibc-ec138c67cbda8b5826a0a2a7ba456408117996dc.zip |
sysdeps/clock_gettime: Use clock_gettime64 if avaliable
With the clock_gettime64 call we prefer to use vDSO. There is no call to clock_gettime64 on glibc with older headers and kernel 5.1+ if it doesn't support vDSO. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/time.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h index d7800eb30f..c19c73ae09 100644 --- a/include/time.h +++ b/include/time.h @@ -211,11 +211,14 @@ extern double __difftime (time_t time1, time_t time0); #if __TIMESIZE == 64 # define __clock_nanosleep_time64 __clock_nanosleep +# define __clock_gettime64 __clock_gettime #else extern int __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec64 *req, struct __timespec64 *rem); libc_hidden_proto (__clock_nanosleep_time64) +extern int __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp); +libc_hidden_proto (__clock_gettime64) #endif /* Use in the clock_* functions. Size of the field representing the |