This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] sysdeps: Add clock_gettime64 vDSO
- From: Alistair Francis <alistair dot francis at wdc dot com>
- To: libc-alpha at sourceware dot org
- Cc: alistair dot francis at wdc dot com, macro at wdc dot com, alistair23 at gmail dot com
- Date: Wed, 18 Sep 2019 16:55:54 -0700
- Subject: [PATCH] sysdeps: Add clock_gettime64 vDSO
- Ironport-sdr: nOHqxL16Emo7Tku4Q/tjWCVh+MjMBb2q5D5fnKa5ERAXtjWjwAL/IJOyfuNvXqYPjfxalpbEND vL13oQ6qX07pZas6eF0qkpML3r6NZJKWb3XL0nyHcoQzMx5K42eaVvPAOH3/AsNvMotNZTzNZf 55YM15XA65inrhDGi2TzOD/7r9GKx0xsyMgSVMPKXoDLf4RyDmlyTfIxDg9v+hYjoBhAZ2lYiC cVNz5T+pWSgiYr7Pi28mLUh9nc6kh7tCS4bS/B/hJ6FPwRab0KfOq7d4GiGmedVqEYE1QFAd9B wmI=
- Ironport-sdr: RBt2BON7zv/gZwNZRUaav2YYLe3ZX1sdhTLlMstCoNMFHEqrlHGYA8DkJJPFshokCInJkzqzsG j1O2Z9+Ri+8v6vcRSjn2DIj4tEDjsWWRmnwd4UTcLBzfbWUviGTI1dBX6XSvJ82NzVjr2479cm gJy2/ajwsQCJQDPH1P25sFu3PD/dqiAKWLiCVp2HT2L1ov9vbHdVBVgIEGFih3wpYm0mvV18Mf hxCrkf7RL3ym702lYBL8JWmCi4spW4IooDQImsDOU6kgiUVkuecVsGQQZ0RlnwVR0rNUSuAV6m yPsFHUcVjGdtUX70R29BjDw4
- Ironport-sdr: mhu+WuFi3NZKptP5lkF1NtwQL7QnFXWWrtlMhRLeX57TIrUK50tYRQb9FvK8wW+9vc/GejdGUj DZLS+lFssDxmzV4SQr+jWV7DXLP06yPTs4mm1wD9SL1ajPCGktrrDa2Rw2SNCoG11vcAT7QEoc /22whmGSC8924etbpqkgWwRjKYb8Kzx6fEuDPBu7F7QS+q56G2FgRtkmbpCmRjw2v9tYsFVFyQ ZeLrdqusCwELr24Ru1+dIE5VDveRlCs85GCHUBkbJdd/iLOeiGbFU0FqdSndV4h+Y3UC/TliV1 JRg=
- Wdcironportexception: Internal
Add support for the clock_gettim64 vDSO calls.
2019-09-18 Alistair Francis <alistair.francis@wdc.com>
* sysdeps/unix/sysv/linux/init-first.c: Add clock_gettime64
vDSO.
* sysdeps/unix/sysv/linux/libc-vdso.h: Likewise.
---
sysdeps/unix/sysv/linux/init-first.c | 10 ++++++++++
sysdeps/unix/sysv/linux/libc-vdso.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
index d90ca820be0..d005d133220 100644
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ b/sysdeps/unix/sysv/linux/init-first.c
@@ -24,6 +24,11 @@
int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
attribute_hidden;
#endif
+/* vDSO symbol used on clock_gettime64 implementation. */
+#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
+int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *)
+ attribute_hidden;
+#endif
/* vDSO symbol used on clock_getres implementation. */
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
@@ -52,6 +57,11 @@ __libc_vdso_platform_setup (void)
= get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME_VSYSCALL);
#endif
+#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
+ VDSO_SYMBOL(clock_gettime64)
+ = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME64_VSYSCALL);
+#endif
+
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
VDSO_SYMBOL(clock_getres)
= get_vdso_mangle_symbol (HAVE_CLOCK_GETRES_VSYSCALL);
diff --git a/sysdeps/unix/sysv/linux/libc-vdso.h b/sysdeps/unix/sysv/linux/libc-vdso.h
index 792ac39d85a..c6d505bab39 100644
--- a/sysdeps/unix/sysv/linux/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/libc-vdso.h
@@ -32,6 +32,10 @@
extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
attribute_hidden;
#endif
+#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
+extern int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *)
+ attribute_hidden;
+#endif
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
attribute_hidden;
--
2.23.0