mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 11:43:34 +08:00
Use libc_ifunc macro for clock_* symbols in librt.
This patch uses the libc_ifunc macro to create already existing ifunc functions clock_getres, clock_gettime, clock_settime, clock_getcpuclockid and clock_nanosleep. If HAVE_IFUNC is defined, the macro COMPAT_REDIRECT uses the libc_ifunc macro. Furthermore some whitespace damage is cleaned. ChangeLog: * rt/clock-compat.c (COMPAT_REDIRECT): Use libc_ifunc macro.
This commit is contained in:
parent
a4d7fe35cd
commit
98ac7b7c85
@ -1,3 +1,7 @@
|
|||||||
|
2016-10-07 Stefan Liebler <stli@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* rt/clock-compat.c (COMPAT_REDIRECT): Use libc_ifunc macro.
|
||||||
|
|
||||||
2016-10-07 Stefan Liebler <stli@linux.vnet.ibm.com>
|
2016-10-07 Stefan Liebler <stli@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (__gettimeofday):
|
* sysdeps/unix/sysv/linux/powerpc/gettimeofday.c (__gettimeofday):
|
||||||
|
@ -28,13 +28,9 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#if HAVE_IFUNC
|
#if HAVE_IFUNC
|
||||||
# define COMPAT_REDIRECT(name, proto, arglist) \
|
# undef INIT_ARCH
|
||||||
__typeof (name) *name##_ifunc (void) asm (#name); \
|
# define INIT_ARCH()
|
||||||
__typeof (name) *name##_ifunc (void) \
|
# define COMPAT_REDIRECT(name, proto, arglist) libc_ifunc (name, &__##name)
|
||||||
{ \
|
|
||||||
return &__##name; \
|
|
||||||
} \
|
|
||||||
asm (".type " #name ", %gnu_indirect_function");
|
|
||||||
#else
|
#else
|
||||||
# define COMPAT_REDIRECT(name, proto, arglist) \
|
# define COMPAT_REDIRECT(name, proto, arglist) \
|
||||||
int \
|
int \
|
||||||
@ -45,21 +41,21 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
COMPAT_REDIRECT (clock_getres,
|
COMPAT_REDIRECT (clock_getres,
|
||||||
(clockid_t clock_id, struct timespec *res),
|
(clockid_t clock_id, struct timespec *res),
|
||||||
(clock_id, res))
|
(clock_id, res))
|
||||||
COMPAT_REDIRECT (clock_gettime,
|
COMPAT_REDIRECT (clock_gettime,
|
||||||
(clockid_t clock_id, struct timespec *tp),
|
(clockid_t clock_id, struct timespec *tp),
|
||||||
(clock_id, tp))
|
(clock_id, tp))
|
||||||
COMPAT_REDIRECT (clock_settime,
|
COMPAT_REDIRECT (clock_settime,
|
||||||
(clockid_t clock_id, const struct timespec *tp),
|
(clockid_t clock_id, const struct timespec *tp),
|
||||||
(clock_id, tp))
|
(clock_id, tp))
|
||||||
COMPAT_REDIRECT (clock_getcpuclockid,
|
COMPAT_REDIRECT (clock_getcpuclockid,
|
||||||
(pid_t pid, clockid_t *clock_id),
|
(pid_t pid, clockid_t *clock_id),
|
||||||
(pid, clock_id))
|
(pid, clock_id))
|
||||||
COMPAT_REDIRECT (clock_nanosleep,
|
COMPAT_REDIRECT (clock_nanosleep,
|
||||||
(clockid_t clock_id, int flags,
|
(clockid_t clock_id, int flags,
|
||||||
const struct timespec *req,
|
const struct timespec *req,
|
||||||
struct timespec *rem),
|
struct timespec *rem),
|
||||||
(clock_id, flags, req, rem))
|
(clock_id, flags, req, rem))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user