Linux: Move timer_create, timer_delete from librt to libc

The symbols were moved using scripts/move-symbol-to-libc.py.

timer_create and timer_delete are tied together via the int/timer_t
compatibility code.  The way the ABI intransition is implemented
is changed with this commit: the implementation is now consolidated
in one file with a TIMER_T_WAS_INT_COMPAT check.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer 2021-06-28 09:51:00 +02:00
parent d7d0efec47
commit 273a2a2ae8
90 changed files with 276 additions and 242 deletions

View File

@ -30,8 +30,6 @@ routines = \
librt-routines = \
librt-compat \
timer_create \
timer_delete \
timer_getoverr \
timer_gettime \
timer_settime \
@ -63,6 +61,8 @@ $(librt-routines-var) += \
mq_timedreceive \
mq_timedsend \
mq_unlink \
timer_create \
timer_delete \
tests := tst-shm tst-timer tst-timer2 \
tst-aio tst-aio64 tst-aio2 tst-aio3 tst-aio4 tst-aio5 tst-aio6 \

View File

@ -21,6 +21,10 @@ libc {
%endif
}
GLIBC_2.2 {
%if PTHREAD_IN_LIBC
timer_create;
timer_delete;
%endif
shm_open;
shm_unlink;
}
@ -52,23 +56,23 @@ libc {
GLIBC_2.34 {
%if PTHREAD_IN_LIBC
__mq_open_2;
aio_cancel;
aio_cancel64;
aio_init;
aio_error;
aio_cancel;
aio_error64;
aio_fsync;
aio_error;
aio_fsync64;
aio_read;
aio_fsync;
aio_init;
aio_read64;
aio_return;
aio_read;
aio_return64;
aio_suspend;
aio_return;
aio_suspend64;
aio_write;
aio_suspend;
aio_write64;
lio_listio;
aio_write;
lio_listio64;
lio_listio;
mq_close;
mq_getattr;
mq_notify;
@ -79,6 +83,8 @@ libc {
mq_timedreceive;
mq_timedsend;
mq_unlink;
timer_create;
timer_delete;
%endif
shm_open;
shm_unlink;
@ -122,8 +128,10 @@ librt {
%endif
}
GLIBC_2.2 {
%if !PTHREAD_IN_LIBC
timer_create;
timer_delete;
%endif
timer_getoverrun;
timer_gettime;
timer_settime;

View File

@ -121,6 +121,10 @@ libc {
posix_fallocate64;
sys_sigabbrev;
sys_siglist;
# Changed timer_t. Only used by some 64-bit targets.
timer_create;
timer_delete;
}
GLIBC_2.3.4 {
sched_getaffinity; sched_setaffinity;
@ -284,6 +288,7 @@ libc {
__sigtimedwait;
__timer_active_sigev_thread;
__timer_active_sigev_thread_lock;
__timer_compat_list;
__timer_helper_once;
__timer_helper_tid;
__timer_start_helper_thread;

View File

@ -2006,6 +2006,8 @@ GLIBC_2.17 tfind F
GLIBC_2.17 time F
GLIBC_2.17 timegm F
GLIBC_2.17 timelocal F
GLIBC_2.17 timer_create F
GLIBC_2.17 timer_delete F
GLIBC_2.17 timerfd_create F
GLIBC_2.17 timerfd_gettime F
GLIBC_2.17 timerfd_settime F
@ -2529,6 +2531,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.17 timer_create F
GLIBC_2.17 timer_delete F
GLIBC_2.17 timer_getoverrun F
GLIBC_2.17 timer_gettime F
GLIBC_2.17 timer_settime F

View File

@ -104,7 +104,7 @@ librt {
}
GLIBC_2.3.3 {
# Changed timer_t.
timer_create; timer_delete; timer_getoverrun; timer_gettime;
timer_getoverrun; timer_gettime;
timer_settime;
}
}

View File

@ -2093,6 +2093,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x8
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 vfwprintf F
GLIBC_2.2 vfwscanf F
@ -2353,6 +2355,8 @@ GLIBC_2.3.3 strtoll_l F
GLIBC_2.3.3 strtoull_l F
GLIBC_2.3.3 sys_sigabbrev D 0x208
GLIBC_2.3.3 sys_siglist D 0x208
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.4 _OtsAddX F
GLIBC_2.3.4 _OtsConvertFloatTX F
GLIBC_2.3.4 _OtsConvertFloatXT F
@ -2623,6 +2627,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,12 +1,8 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F
GLIBC_2.3 __librt_version_placeholder F
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.3 timer_getoverrun F
GLIBC_2.3.3 timer_gettime F
GLIBC_2.3.3 timer_settime F

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_create.c>

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_delete.c>

View File

@ -1940,6 +1940,8 @@ GLIBC_2.32 thrd_yield F
GLIBC_2.32 time F
GLIBC_2.32 timegm F
GLIBC_2.32 timelocal F
GLIBC_2.32 timer_create F
GLIBC_2.32 timer_delete F
GLIBC_2.32 timerfd_create F
GLIBC_2.32 timerfd_gettime F
GLIBC_2.32 timerfd_settime F
@ -2288,6 +2290,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.32 timer_create F
GLIBC_2.32 timer_delete F
GLIBC_2.32 timer_getoverrun F
GLIBC_2.32 timer_gettime F
GLIBC_2.32 timer_settime F

View File

@ -434,6 +434,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F
@ -2350,6 +2352,8 @@ GLIBC_2.4 tfind F
GLIBC_2.4 time F
GLIBC_2.4 timegm F
GLIBC_2.4 timelocal F
GLIBC_2.4 timer_create F
GLIBC_2.4 timer_delete F
GLIBC_2.4 times F
GLIBC_2.4 timezone D 0x4
GLIBC_2.4 tmpfile F

View File

@ -1,7 +1,5 @@
GLIBC_2.34 __timer_gettime64 F
GLIBC_2.34 __timer_settime64 F
GLIBC_2.4 timer_create F
GLIBC_2.4 timer_delete F
GLIBC_2.4 timer_getoverrun F
GLIBC_2.4 timer_gettime F
GLIBC_2.4 timer_settime F

View File

@ -431,6 +431,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F
@ -2347,6 +2349,8 @@ GLIBC_2.4 tfind F
GLIBC_2.4 time F
GLIBC_2.4 timegm F
GLIBC_2.4 timelocal F
GLIBC_2.4 timer_create F
GLIBC_2.4 timer_delete F
GLIBC_2.4 times F
GLIBC_2.4 timezone D 0x4
GLIBC_2.4 tmpfile F

View File

@ -1,7 +1,5 @@
GLIBC_2.34 __timer_gettime64 F
GLIBC_2.34 __timer_settime64 F
GLIBC_2.4 timer_create F
GLIBC_2.4 timer_delete F
GLIBC_2.4 timer_getoverrun F
GLIBC_2.4 timer_gettime F
GLIBC_2.4 timer_settime F

View File

@ -2030,6 +2030,8 @@ GLIBC_2.29 thrd_yield F
GLIBC_2.29 time F
GLIBC_2.29 timegm F
GLIBC_2.29 timelocal F
GLIBC_2.29 timer_create F
GLIBC_2.29 timer_delete F
GLIBC_2.29 timerfd_create F
GLIBC_2.29 timerfd_gettime F
GLIBC_2.29 timerfd_settime F
@ -2551,6 +2553,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.29 timer_create F
GLIBC_2.29 timer_delete F
GLIBC_2.29 timer_getoverrun F
GLIBC_2.29 timer_gettime F
GLIBC_2.29 timer_settime F

View File

@ -1744,6 +1744,8 @@ GLIBC_2.2 tfind F
GLIBC_2.2 time F
GLIBC_2.2 timegm F
GLIBC_2.2 timelocal F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 times F
GLIBC_2.2 timezone D 0x4
GLIBC_2.2 tmpfile F
@ -2504,6 +2506,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -2106,6 +2106,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x4
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 versionsort64 F
GLIBC_2.2 vfwprintf F
@ -2688,6 +2690,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -30,7 +30,7 @@ libc {
librt {
GLIBC_2.3.3 {
# Changed timer_t.
timer_create; timer_delete; timer_getoverrun; timer_gettime;
timer_getoverrun; timer_gettime;
timer_settime;
}
}

View File

@ -1765,6 +1765,8 @@ GLIBC_2.2 tfind F
GLIBC_2.2 time F
GLIBC_2.2 timegm F
GLIBC_2.2 timelocal F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 times F
GLIBC_2.2 timezone D 0x8
GLIBC_2.2 tmpfile F
@ -2218,6 +2220,8 @@ GLIBC_2.3.3 strtoll_l F
GLIBC_2.3.3 strtoull_l F
GLIBC_2.3.3 sys_sigabbrev D 0x208
GLIBC_2.3.3 sys_siglist D 0x208
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.4 __chk_fail F
GLIBC_2.3.4 __fprintf_chk F
GLIBC_2.3.4 __gets_chk F
@ -2461,6 +2465,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,11 +1,7 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.3 timer_getoverrun F
GLIBC_2.3.3 timer_gettime F
GLIBC_2.3.3 timer_settime F

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_create.c>

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_delete.c>

View File

@ -48,6 +48,11 @@ libc_hidden_proto (__timer_active_sigev_thread)
extern pthread_mutex_t __timer_active_sigev_thread_lock;
libc_hidden_proto (__timer_active_sigev_thread_lock)
extern __typeof (timer_create) __timer_create;
libc_hidden_proto (__timer_create)
extern __typeof (timer_delete) __timer_delete;
libc_hidden_proto (__timer_delete)
/* Type of timers in the kernel. */
typedef int kernel_timer_t;
@ -107,3 +112,9 @@ timerid_to_kernel_timer (timer_t timerid)
/* New targets use int instead of timer_t. The difference only
matters on 64-bit targets. */
#include <timer_t_was_int_compat.h>
#if TIMER_T_WAS_INT_COMPAT
# define OLD_TIMER_MAX 256
extern timer_t __timer_compat_list[OLD_TIMER_MAX];
libc_hidden_proto (__timer_compat_list)
#endif

View File

@ -435,6 +435,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F
@ -2330,6 +2332,8 @@ GLIBC_2.4 tfind F
GLIBC_2.4 time F
GLIBC_2.4 timegm F
GLIBC_2.4 timelocal F
GLIBC_2.4 timer_create F
GLIBC_2.4 timer_delete F
GLIBC_2.4 times F
GLIBC_2.4 timezone D 0x4
GLIBC_2.4 tmpfile F

View File

@ -1,7 +1,5 @@
GLIBC_2.34 __timer_gettime64 F
GLIBC_2.34 __timer_settime64 F
GLIBC_2.4 timer_create F
GLIBC_2.4 timer_delete F
GLIBC_2.4 timer_getoverrun F
GLIBC_2.4 timer_gettime F
GLIBC_2.4 timer_settime F

View File

@ -2062,6 +2062,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x4
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 versionsort64 F
GLIBC_2.2 vfwprintf F
@ -2631,6 +2633,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -2010,6 +2010,8 @@ GLIBC_2.18 tfind F
GLIBC_2.18 time F
GLIBC_2.18 timegm F
GLIBC_2.18 timelocal F
GLIBC_2.18 timer_create F
GLIBC_2.18 timer_delete F
GLIBC_2.18 timerfd_create F
GLIBC_2.18 timerfd_gettime F
GLIBC_2.18 timerfd_settime F
@ -2602,6 +2604,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.18 timer_create F
GLIBC_2.18 timer_delete F
GLIBC_2.18 timer_getoverrun F
GLIBC_2.18 timer_gettime F
GLIBC_2.18 timer_settime F

View File

@ -2010,6 +2010,8 @@ GLIBC_2.18 tfind F
GLIBC_2.18 time F
GLIBC_2.18 timegm F
GLIBC_2.18 timelocal F
GLIBC_2.18 timer_create F
GLIBC_2.18 timer_delete F
GLIBC_2.18 timerfd_create F
GLIBC_2.18 timerfd_gettime F
GLIBC_2.18 timerfd_settime F
@ -2599,6 +2601,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.18 timer_create F
GLIBC_2.18 timer_delete F
GLIBC_2.18 timer_getoverrun F
GLIBC_2.18 timer_gettime F
GLIBC_2.18 timer_settime F

View File

@ -1993,6 +1993,8 @@ GLIBC_2.2 sys_siglist D 0x100
GLIBC_2.2 sysv_signal F
GLIBC_2.2 tcgetsid F
GLIBC_2.2 tdestroy F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 tmpfile F
GLIBC_2.2 tmpfile64 F
GLIBC_2.2 truncate64 F
@ -2596,6 +2598,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -1991,6 +1991,8 @@ GLIBC_2.2 sys_siglist D 0x100
GLIBC_2.2 sysv_signal F
GLIBC_2.2 tcgetsid F
GLIBC_2.2 tdestroy F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 tmpfile F
GLIBC_2.2 tmpfile64 F
GLIBC_2.2 truncate64 F
@ -2594,6 +2596,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1989,6 +1989,8 @@ GLIBC_2.2 sys_siglist D 0x100
GLIBC_2.2 sysv_signal F
GLIBC_2.2 tcgetsid F
GLIBC_2.2 tdestroy F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 tmpfile F
GLIBC_2.2 tmpfile64 F
GLIBC_2.2 truncate64 F
@ -2602,6 +2604,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -1985,6 +1985,8 @@ GLIBC_2.2 sys_siglist D 0x200
GLIBC_2.2 sysv_signal F
GLIBC_2.2 tcgetsid F
GLIBC_2.2 tdestroy F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 tmpfile F
GLIBC_2.2 tmpfile64 F
GLIBC_2.2 truncate64 F
@ -2517,6 +2519,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -2052,6 +2052,8 @@ GLIBC_2.21 tfind F
GLIBC_2.21 time F
GLIBC_2.21 timegm F
GLIBC_2.21 timelocal F
GLIBC_2.21 timer_create F
GLIBC_2.21 timer_delete F
GLIBC_2.21 timerfd_create F
GLIBC_2.21 timerfd_gettime F
GLIBC_2.21 timerfd_settime F
@ -2641,6 +2643,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.21 timer_create F
GLIBC_2.21 timer_delete F
GLIBC_2.21 timer_getoverrun F
GLIBC_2.21 timer_gettime F
GLIBC_2.21 timer_settime F

View File

@ -2067,6 +2067,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x4
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 vfwprintf F
GLIBC_2.2 vfwscanf F
@ -2658,6 +2660,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -2071,6 +2071,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x4
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 vfwprintf F
GLIBC_2.2 vfwscanf F
@ -2691,6 +2693,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -29,7 +29,7 @@ libc {
librt {
GLIBC_2.3.3 {
# Changed timer_t.
timer_create; timer_delete; timer_getoverrun; timer_gettime;
timer_getoverrun; timer_gettime;
timer_settime;
}
}

View File

@ -1886,6 +1886,8 @@ GLIBC_2.3 tfind F
GLIBC_2.3 time F
GLIBC_2.3 timegm F
GLIBC_2.3 timelocal F
GLIBC_2.3 timer_create F
GLIBC_2.3 timer_delete F
GLIBC_2.3 times F
GLIBC_2.3 timezone D 0x8
GLIBC_2.3 tmpfile F
@ -2162,6 +2164,8 @@ GLIBC_2.3.3 strtoll_l F
GLIBC_2.3.3 strtoull_l F
GLIBC_2.3.3 sys_sigabbrev D 0x208
GLIBC_2.3.3 sys_siglist D 0x208
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.4 __chk_fail F
GLIBC_2.3.4 __fprintf_chk F
GLIBC_2.3.4 __gets_chk F
@ -2425,6 +2429,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,10 +1,6 @@
GLIBC_2.3 timer_create F
GLIBC_2.3 timer_delete F
GLIBC_2.3 timer_getoverrun F
GLIBC_2.3 timer_gettime F
GLIBC_2.3 timer_settime F
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.3 timer_getoverrun F
GLIBC_2.3.3 timer_gettime F
GLIBC_2.3.3 timer_settime F

View File

@ -2094,6 +2094,8 @@ GLIBC_2.17 tfind F
GLIBC_2.17 time F
GLIBC_2.17 timegm F
GLIBC_2.17 timelocal F
GLIBC_2.17 timer_create F
GLIBC_2.17 timer_delete F
GLIBC_2.17 timerfd_create F
GLIBC_2.17 timerfd_gettime F
GLIBC_2.17 timerfd_settime F
@ -2725,6 +2727,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.17 timer_create F
GLIBC_2.17 timer_delete F
GLIBC_2.17 timer_getoverrun F
GLIBC_2.17 timer_gettime F
GLIBC_2.17 timer_settime F

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_create.c>

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_delete.c>

View File

@ -1950,6 +1950,8 @@ GLIBC_2.33 thrd_yield F
GLIBC_2.33 time F
GLIBC_2.33 timegm F
GLIBC_2.33 timelocal F
GLIBC_2.33 timer_create F
GLIBC_2.33 timer_delete F
GLIBC_2.33 timerfd_create F
GLIBC_2.33 timerfd_gettime F
GLIBC_2.33 timerfd_settime F
@ -2290,6 +2292,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.33 timer_create F
GLIBC_2.33 timer_delete F
GLIBC_2.33 timer_getoverrun F
GLIBC_2.33 timer_gettime F
GLIBC_2.33 timer_settime F

View File

@ -2016,6 +2016,8 @@ GLIBC_2.27 tfind F
GLIBC_2.27 time F
GLIBC_2.27 timegm F
GLIBC_2.27 timelocal F
GLIBC_2.27 timer_create F
GLIBC_2.27 timer_delete F
GLIBC_2.27 timerfd_create F
GLIBC_2.27 timerfd_gettime F
GLIBC_2.27 timerfd_settime F
@ -2490,6 +2492,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.27 timer_create F
GLIBC_2.27 timer_delete F
GLIBC_2.27 timer_getoverrun F
GLIBC_2.27 timer_gettime F
GLIBC_2.27 timer_settime F

View File

@ -2065,6 +2065,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x4
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 versionsort64 F
GLIBC_2.2 vfwprintf F
@ -2656,6 +2658,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -9,7 +9,7 @@ libc {
librt {
GLIBC_2.3.3 {
# Changed timer_t.
timer_create; timer_delete; timer_getoverrun; timer_gettime;
timer_getoverrun; timer_gettime;
timer_settime;
}
}

View File

@ -1761,6 +1761,8 @@ GLIBC_2.2 tfind F
GLIBC_2.2 time F
GLIBC_2.2 timegm F
GLIBC_2.2 timelocal F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 times F
GLIBC_2.2 timezone D 0x8
GLIBC_2.2 tmpfile F
@ -2208,6 +2210,8 @@ GLIBC_2.3.3 strtoll_l F
GLIBC_2.3.3 strtoull_l F
GLIBC_2.3.3 sys_sigabbrev D 0x208
GLIBC_2.3.3 sys_siglist D 0x208
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.4 __chk_fail F
GLIBC_2.3.4 __fprintf_chk F
GLIBC_2.3.4 __gets_chk F
@ -2462,6 +2466,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,10 +1,6 @@
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.3 timer_getoverrun F
GLIBC_2.3.3 timer_gettime F
GLIBC_2.3.3 timer_settime F

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_create.c>

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_delete.c>

View File

@ -1748,6 +1748,8 @@ GLIBC_2.2 tfind F
GLIBC_2.2 time F
GLIBC_2.2 timegm F
GLIBC_2.2 timelocal F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 times F
GLIBC_2.2 timezone D 0x4
GLIBC_2.2 tmpfile F
@ -2511,6 +2513,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -1748,6 +1748,8 @@ GLIBC_2.2 tfind F
GLIBC_2.2 time F
GLIBC_2.2 timegm F
GLIBC_2.2 timelocal F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 times F
GLIBC_2.2 timezone D 0x4
GLIBC_2.2 tmpfile F
@ -2508,6 +2510,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -2060,6 +2060,8 @@ GLIBC_2.2 svc_max_pollfd D 0x4
GLIBC_2.2 svc_pollfd D 0x4
GLIBC_2.2 swprintf F
GLIBC_2.2 swscanf F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 ungetwc F
GLIBC_2.2 vfwprintf F
GLIBC_2.2 vfwscanf F
@ -2651,6 +2653,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,6 +1,4 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F

View File

@ -14,7 +14,7 @@ libc {
librt {
GLIBC_2.3.3 {
# Changed timer_t.
timer_create; timer_delete; timer_getoverrun; timer_gettime;
timer_getoverrun; timer_gettime;
timer_settime;
}
}

View File

@ -1791,6 +1791,8 @@ GLIBC_2.2 tfind F
GLIBC_2.2 time F
GLIBC_2.2 timegm F
GLIBC_2.2 timelocal F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 times F
GLIBC_2.2 timezone D 0x8
GLIBC_2.2 tmpfile F
@ -2242,6 +2244,8 @@ GLIBC_2.3.3 strtoll_l F
GLIBC_2.3.3 strtoull_l F
GLIBC_2.3.3 sys_sigabbrev D 0x208
GLIBC_2.3.3 sys_siglist D 0x208
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.4 __chk_fail F
GLIBC_2.3.4 __fprintf_chk F
GLIBC_2.3.4 __gets_chk F
@ -2484,6 +2488,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,12 +1,8 @@
GLIBC_2.1 __librt_version_placeholder F
GLIBC_2.2 timer_create F
GLIBC_2.2 timer_delete F
GLIBC_2.2 timer_getoverrun F
GLIBC_2.2 timer_gettime F
GLIBC_2.2 timer_settime F
GLIBC_2.3 __librt_version_placeholder F
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.3 timer_getoverrun F
GLIBC_2.3.3 timer_gettime F
GLIBC_2.3.3 timer_settime F

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_create.c>

View File

@ -1 +0,0 @@
#include <sysdeps/unix/sysv/linux/x86_64/timer_delete.c>

View File

@ -27,17 +27,11 @@
#include <pthreadP.h>
#include "kernel-posix-timers.h"
#include "kernel-posix-cpu-timers.h"
#ifdef timer_create_alias
# define timer_create timer_create_alias
#endif
#include <shlib-compat.h>
int
timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
___timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
{
#undef timer_create
{
clockid_t syscall_clockid = (clock_id == CLOCK_PROCESS_CPUTIME_ID
? MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED)
@ -74,7 +68,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
else
{
/* Create the helper thread. */
pthread_once (&__timer_helper_once, __timer_start_helper_thread);
__pthread_once (&__timer_helper_once, __timer_start_helper_thread);
if (__timer_helper_tid == 0)
{
/* No resources to start the helper thread. */
@ -93,7 +87,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
/* We cannot simply copy the thread attributes since the
implementation might keep internal information for
each instance. */
pthread_attr_init (&newp->attr);
__pthread_attr_init (&newp->attr);
if (evp->sigev_notify_attributes != NULL)
{
struct pthread_attr *nattr;
@ -111,7 +105,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
}
/* In any case set the detach flag. */
pthread_attr_setdetachstate (&newp->attr, PTHREAD_CREATE_DETACHED);
__pthread_attr_setdetachstate (&newp->attr, PTHREAD_CREATE_DETACHED);
/* Create the event structure for the kernel timer. */
struct sigevent sev =
@ -132,10 +126,10 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
}
/* Add to the queue of active timers with thread delivery. */
pthread_mutex_lock (&__timer_active_sigev_thread_lock);
__pthread_mutex_lock (&__timer_active_sigev_thread_lock);
newp->next = __timer_active_sigev_thread;
__timer_active_sigev_thread = newp;
pthread_mutex_unlock (&__timer_active_sigev_thread_lock);
__pthread_mutex_unlock (&__timer_active_sigev_thread_lock);
*timerid = timer_to_timerid (newp);
}
@ -143,3 +137,52 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
return 0;
}
versioned_symbol (libc, ___timer_create, timer_create, GLIBC_2_34);
libc_hidden_ver (___timer_create, __timer_create)
#if TIMER_T_WAS_INT_COMPAT
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_3_3, GLIBC_2_34)
compat_symbol (librt, ___timer_create, timer_create, GLIBC_2_3_3);
# endif
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
timer_t __timer_compat_list[OLD_TIMER_MAX] __attribute__ ((nocommon));
libc_hidden_data_def (__timer_compat_list)
int
__timer_create_old (clockid_t clock_id, struct sigevent *evp, int *timerid)
{
timer_t newp;
int res = __timer_create (clock_id, evp, &newp);
if (res == 0)
{
int i;
for (i = 0; i < OLD_TIMER_MAX; ++i)
if (__timer_compat_list[i] == NULL
&& ! atomic_compare_and_exchange_bool_acq (&__timer_compat_list[i],
newp, NULL))
{
*timerid = i;
break;
}
if (__glibc_unlikely (i == OLD_TIMER_MAX))
{
/* No free slot. */
__timer_delete (newp);
__set_errno (EINVAL);
res = -1;
}
}
return res;
}
compat_symbol (librt, __timer_create_old, timer_create, GLIBC_2_2);
# endif /* OTHER_SHLIB_COMPAT */
#else /* !TIMER_T_WAS_INT_COMPAT */
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34)
compat_symbol (librt, ___timer_create, timer_create, GLIBC_2_2);
# endif
#endif /* !TIMER_T_WAS_INT_COMPAT */

View File

@ -21,17 +21,12 @@
#include <time.h>
#include <sysdep.h>
#include "kernel-posix-timers.h"
#ifdef timer_delete_alias
# define timer_delete timer_delete_alias
#endif
#include <pthreadP.h>
#include <shlib-compat.h>
int
timer_delete (timer_t timerid)
___timer_delete (timer_t timerid)
{
#undef timer_delete
kernel_timer_t ktimerid = timerid_to_kernel_timer (timerid);
int res = INLINE_SYSCALL_CALL (timer_delete, ktimerid);
@ -42,7 +37,7 @@ timer_delete (timer_t timerid)
struct timer *kt = timerid_to_timer (timerid);
/* Remove the timer from the list. */
pthread_mutex_lock (&__timer_active_sigev_thread_lock);
__pthread_mutex_lock (&__timer_active_sigev_thread_lock);
if (__timer_active_sigev_thread == kt)
__timer_active_sigev_thread = kt->next;
else
@ -57,7 +52,7 @@ timer_delete (timer_t timerid)
else
prevp = prevp->next;
}
pthread_mutex_unlock (&__timer_active_sigev_thread_lock);
__pthread_mutex_unlock (&__timer_active_sigev_thread_lock);
free (kt);
}
@ -69,3 +64,34 @@ timer_delete (timer_t timerid)
Return the error. */
return -1;
}
versioned_symbol (libc, ___timer_delete, timer_delete, GLIBC_2_34);
libc_hidden_ver (___timer_delete, __timer_delete)
#if TIMER_T_WAS_INT_COMPAT
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_3_3, GLIBC_2_34)
compat_symbol (librt, ___timer_delete, timer_delete, GLIBC_2_3_3);
#endif
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
int
__timer_delete_old (int timerid)
{
int res = __timer_delete (__timer_compat_list[timerid]);
if (res == 0)
/* Successful timer deletion, now free the index. We only need to
store a word and that better be atomic. */
__timer_compat_list[timerid] = NULL;
return res;
}
compat_symbol (librt, __timer_delete_old, timer_delete, GLIBC_2_2);
# endif /* OTHER_SHLIB_COMPAT */
#else /* !TIMER_T_WAS_INT_COMPAT */
/* The transition from int to timer_t did not change ABI because the
type sizes are the same. */
# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34)
compat_symbol (librt, ___timer_delete, timer_delete, GLIBC_2_2);
# endif
#endif /* !TIMER_T_WAS_INT_COMPAT */

View File

@ -1760,6 +1760,8 @@ GLIBC_2.2.5 tfind F
GLIBC_2.2.5 time F
GLIBC_2.2.5 timegm F
GLIBC_2.2.5 timelocal F
GLIBC_2.2.5 timer_create F
GLIBC_2.2.5 timer_delete F
GLIBC_2.2.5 times F
GLIBC_2.2.5 timezone D 0x8
GLIBC_2.2.5 tmpfile F
@ -2196,6 +2198,8 @@ GLIBC_2.3.3 strtoll_l F
GLIBC_2.3.3 strtoull_l F
GLIBC_2.3.3 sys_sigabbrev D 0x208
GLIBC_2.3.3 sys_siglist D 0x208
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.4 __chk_fail F
GLIBC_2.3.4 __fprintf_chk F
GLIBC_2.3.4 __gets_chk F
@ -2440,6 +2444,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,10 +1,6 @@
GLIBC_2.2.5 timer_create F
GLIBC_2.2.5 timer_delete F
GLIBC_2.2.5 timer_getoverrun F
GLIBC_2.2.5 timer_gettime F
GLIBC_2.2.5 timer_settime F
GLIBC_2.3.3 timer_create F
GLIBC_2.3.3 timer_delete F
GLIBC_2.3.3 timer_getoverrun F
GLIBC_2.3.3 timer_gettime F
GLIBC_2.3.3 timer_settime F

View File

@ -11,7 +11,7 @@ libc {
librt {
GLIBC_2.3.3 {
# Changed timer_t.
timer_create; timer_delete; timer_getoverrun; timer_gettime;
timer_getoverrun; timer_gettime;
timer_settime;
}
}

View File

@ -20,14 +20,6 @@
#include <time.h>
#include <sys/types.h>
#define OLD_TIMER_MAX 256
extern timer_t __compat_timer_list[OLD_TIMER_MAX] attribute_hidden;
extern int __timer_create_new (clockid_t clock_id, struct sigevent *evp,
timer_t *timerid);
extern int __timer_delete_new (timer_t timerid);
extern int __timer_getoverrun_new (timer_t timerid);
extern int __timer_gettime_new (timer_t timerid, struct itimerspec *value);
extern int __timer_settime_new (timer_t timerid, int flags,

View File

@ -1,65 +0,0 @@
/* Copyright (C) 2003-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, see <https://www.gnu.org/licenses/>. */
#include <shlib-compat.h>
#include "compat-timer.h"
#include <atomic.h>
#define timer_create_alias __timer_create_new
#include <sysdeps/unix/sysv/linux/timer_create.c>
#undef timer_create
versioned_symbol (librt, __timer_create_new, timer_create, GLIBC_2_3_3);
#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
timer_t __compat_timer_list[OLD_TIMER_MAX] attribute_hidden;
int
__timer_create_old (clockid_t clock_id, struct sigevent *evp, int *timerid)
{
timer_t newp;
int res = __timer_create_new (clock_id, evp, &newp);
if (res == 0)
{
int i;
for (i = 0; i < OLD_TIMER_MAX; ++i)
if (__compat_timer_list[i] == NULL
&& ! atomic_compare_and_exchange_bool_acq (&__compat_timer_list[i],
newp, NULL))
{
*timerid = i;
break;
}
if (__glibc_unlikely (i == OLD_TIMER_MAX))
{
/* No free slot. */
(void) __timer_delete_new (newp);
__set_errno (EINVAL);
res = -1;
}
}
return res;
}
compat_symbol (librt, __timer_create_old, timer_create, GLIBC_2_2);
#endif

View File

@ -1,44 +0,0 @@
/* Copyright (C) 2003-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, see <https://www.gnu.org/licenses/>. */
#include <shlib-compat.h>
#include "compat-timer.h"
#define timer_delete_alias __timer_delete_new
#include <sysdeps/unix/sysv/linux/timer_delete.c>
#undef timer_delete
versioned_symbol (librt, __timer_delete_new, timer_delete, GLIBC_2_3_3);
#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
int
__timer_delete_old (int timerid)
{
int res = __timer_delete_new (__compat_timer_list[timerid]);
if (res == 0)
/* Successful timer deletion, now free the index. We only need to
store a word and that better be atomic. */
__compat_timer_list[timerid] = NULL;
return res;
}
compat_symbol (librt, __timer_delete_old, timer_delete, GLIBC_2_2);
#endif

View File

@ -32,7 +32,7 @@ versioned_symbol (librt, __timer_getoverrun_new, timer_getoverrun,
int
__timer_getoverrun_old (int timerid)
{
return __timer_getoverrun_new (__compat_timer_list[timerid]);
return __timer_getoverrun_new (__timer_compat_list[timerid]);
}
compat_symbol (librt, __timer_getoverrun_old, timer_getoverrun, GLIBC_2_2);
#endif

View File

@ -35,7 +35,7 @@ versioned_symbol (librt, __timer_gettime_new, timer_gettime, GLIBC_2_3_3);
int
__timer_gettime_old (int timerid, struct itimerspec *value)
{
return __timer_gettime_new (__compat_timer_list[timerid], value);
return __timer_gettime_new (__timer_compat_list[timerid], value);
}
compat_symbol (librt, __timer_gettime_old, timer_gettime, GLIBC_2_2);
#endif

View File

@ -37,7 +37,7 @@ int
__timer_settime_old (int timerid, int flags, const struct itimerspec *value,
struct itimerspec *ovalue)
{
return __timer_settime_new (__compat_timer_list[timerid], flags,
return __timer_settime_new (__timer_compat_list[timerid], flags,
value, ovalue);
}
compat_symbol (librt, __timer_settime_old, timer_settime, GLIBC_2_2);

View File

@ -2011,6 +2011,8 @@ GLIBC_2.16 tfind F
GLIBC_2.16 time F
GLIBC_2.16 timegm F
GLIBC_2.16 timelocal F
GLIBC_2.16 timer_create F
GLIBC_2.16 timer_delete F
GLIBC_2.16 timerfd_create F
GLIBC_2.16 timerfd_gettime F
GLIBC_2.16 timerfd_settime F
@ -2544,6 +2546,8 @@ GLIBC_2.34 thrd_create F
GLIBC_2.34 thrd_detach F
GLIBC_2.34 thrd_exit F
GLIBC_2.34 thrd_join F
GLIBC_2.34 timer_create F
GLIBC_2.34 timer_delete F
GLIBC_2.34 timespec_getres F
GLIBC_2.34 tss_create F
GLIBC_2.34 tss_delete F

View File

@ -1,5 +1,3 @@
GLIBC_2.16 timer_create F
GLIBC_2.16 timer_delete F
GLIBC_2.16 timer_getoverrun F
GLIBC_2.16 timer_gettime F
GLIBC_2.16 timer_settime F