mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
sysdeps: Add clock_gettime64 vDSO
Add support for the clock_gettim64 vDSO calls. These are protected by the HAVE_CLOCK_GETTIME64_VSYSCALL define. HAVE_CLOCK_GETTIME64_VSYSCALL should be defined for 32-bit platforms (WORDSIZE == 32) that only run on the 5.1 kernel or later. WORDSIZE == 64 platforms can use #define __vdso_clock_gettime64 __vdso_clock_gettime and use the __vdso_clock_gettime syscall as they don't have a __vdso_clock_gettime64 call. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -24,6 +24,11 @@
|
|||||||
int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
|
int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
#endif
|
#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. */
|
/* vDSO symbol used on clock_getres implementation. */
|
||||||
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
||||||
int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
|
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);
|
= get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME_VSYSCALL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
|
||||||
|
VDSO_SYMBOL(clock_gettime64)
|
||||||
|
= get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME64_VSYSCALL);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
||||||
VDSO_SYMBOL(clock_getres)
|
VDSO_SYMBOL(clock_getres)
|
||||||
= get_vdso_mangle_symbol (HAVE_CLOCK_GETRES_VSYSCALL);
|
= get_vdso_mangle_symbol (HAVE_CLOCK_GETRES_VSYSCALL);
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
|
extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
|
||||||
|
extern int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *)
|
||||||
|
attribute_hidden;
|
||||||
|
#endif
|
||||||
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
#ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
||||||
extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
|
extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
Reference in New Issue
Block a user