diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-05-05 17:15:57 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-05-05 17:19:48 +0200 |
| commit | 018c75dcb1ee93f3ff0d3d9cbdf1fe48aa630315 (patch) | |
| tree | a3553b7fa23e420e93f1f23a3fb7d7aea95765dc | |
| parent | 793042c63c511f5280e960108b2f0b13e115245d (diff) | |
| download | glibc-018c75dcb1ee93f3ff0d3d9cbdf1fe48aa630315.tar.xz glibc-018c75dcb1ee93f3ff0d3d9cbdf1fe48aa630315.zip | |
nptl: Move sem_timedwait into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
65 files changed, 81 insertions, 37 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 36c0f270b9..9f73cf2434 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -158,6 +158,7 @@ routines = \ sem_open \ sem_post \ sem_routines \ + sem_timedwait \ tpp \ unwind \ @@ -209,7 +210,6 @@ libpthread-routines = \ pthread_sigqueue \ pthread_timedjoin \ pthread_tryjoin \ - sem_timedwait \ sem_unlink \ sem_wait \ vars \ diff --git a/nptl/Versions b/nptl/Versions index df3967516f..f19c2355f1 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -114,6 +114,7 @@ libc { pthread_spin_trylock; pthread_spin_unlock; pthread_yield; + sem_timedwait; } GLIBC_2.2.3 { pthread_getattr_np; @@ -267,6 +268,7 @@ libc { sem_init; sem_open; sem_post; + sem_timedwait; thrd_exit; tss_create; tss_delete; @@ -371,7 +373,6 @@ libpthread { pthread_yield; pthread_rwlock_timedrdlock; pthread_rwlock_timedwrlock; - sem_timedwait; } GLIBC_2.2.3 { diff --git a/nptl/sem_timedwait.c b/nptl/sem_timedwait.c index 770020e26c..584546c706 100644 --- a/nptl/sem_timedwait.c +++ b/nptl/sem_timedwait.c @@ -24,7 +24,7 @@ /* This is in a separate file because because sem_timedwait is only provided if __USE_XOPEN2K is defined. */ int -__sem_timedwait64 (sem_t *sem, const struct __timespec64 *abstime) +___sem_timedwait64 (sem_t *sem, const struct __timespec64 *abstime) { if (! valid_nanoseconds (abstime->tv_nsec)) { @@ -42,15 +42,23 @@ __sem_timedwait64 (sem_t *sem, const struct __timespec64 *abstime) CLOCK_REALTIME, abstime); } -#if __TIMESIZE != 64 -libpthread_hidden_def (__sem_timedwait64) +#if __TIMESIZE == 64 +strong_alias (___sem_timedwait64, ___sem_timedwait) +#else /* __TIMESPEC64 != 64 */ +libc_hidden_ver (___sem_timedwait64, __sem_timedwait64) +#ifndef SHARED +strong_alias (___sem_timedwait64, __sem_timedwait64) +#endif int -__sem_timedwait (sem_t *sem, const struct timespec *abstime) +___sem_timedwait (sem_t *sem, const struct timespec *abstime) { struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); return __sem_timedwait64 (sem, &ts64); } +#endif /* __TIMESPEC64 != 64 */ +versioned_symbol (libc, ___sem_timedwait, sem_timedwait, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, ___sem_timedwait, sem_timedwait, GLIBC_2_2); #endif -weak_alias (__sem_timedwait, sem_timedwait) diff --git a/nptl/semaphoreP.h b/nptl/semaphoreP.h index f030f0e4de..43ad849761 100644 --- a/nptl/semaphoreP.h +++ b/nptl/semaphoreP.h @@ -57,5 +57,5 @@ __sem_clockwait64 (sem_t *sem, clockid_t clockid, libc_hidden_proto (__sem_clockwait64) extern int __sem_timedwait64 (sem_t *sem, const struct __timespec64 *abstime); -libpthread_hidden_proto (__sem_timedwait64) +libc_hidden_proto (__sem_timedwait64) #endif diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 64f966289f..8b0c5316cf 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -1666,6 +1666,7 @@ GLIBC_2.17 sem_getvalue F GLIBC_2.17 sem_init F GLIBC_2.17 sem_open F GLIBC_2.17 sem_post F +GLIBC_2.17 sem_timedwait F GLIBC_2.17 semctl F GLIBC_2.17 semget F GLIBC_2.17 semop F @@ -2360,6 +2361,7 @@ GLIBC_2.34 sem_getvalue F GLIBC_2.34 sem_init F GLIBC_2.34 sem_open F GLIBC_2.34 sem_post F +GLIBC_2.34 sem_timedwait F GLIBC_2.34 thrd_exit F GLIBC_2.34 tss_create F GLIBC_2.34 tss_delete F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index e2a5c2b8e0..da05cd4d59 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -39,7 +39,6 @@ GLIBC_2.17 pthread_setschedprio F GLIBC_2.17 pthread_sigqueue F GLIBC_2.17 pthread_timedjoin_np F GLIBC_2.17 pthread_tryjoin_np F -GLIBC_2.17 sem_timedwait F GLIBC_2.17 sem_trywait F GLIBC_2.17 sem_unlink F GLIBC_2.17 sem_wait F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 08ac2067c9..b09f69df75 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2026,6 +2026,7 @@ GLIBC_2.2 rcmd_af F GLIBC_2.2 rexec_af F GLIBC_2.2 rresvport_af F GLIBC_2.2 ruserok_af F +GLIBC_2.2 sem_timedwait F GLIBC_2.2 semctl F GLIBC_2.2 shmctl F GLIBC_2.2 svc_getreq_common F @@ -2445,6 +2446,7 @@ GLIBC_2.34 sem_getvalue F GLIBC_2.34 sem_init F GLIBC_2.34 sem_open F GLIBC_2.34 sem_post F +GLIBC_2.34 sem_timedwait F GLIBC_2.34 thrd_exit F GLIBC_2.34 tss_create F GLIBC_2.34 tss_delete F diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist index 1e04fed446..64f7b97cfd 100644 --- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist @@ -38,7 +38,6 @@ GLIBC_2.2 pthread_barrierattr_destroy F GLIBC_2.2 pthread_barrierattr_init F GLIBC_2.2 pthread_barrierattr_setpshared F GLIBC_2.2 pthread_getcpuclockid F -GLIBC_2.2 sem_timedwait F GLIBC_2.2.3 __libpthread_version_placeholder F GLIBC_2.2.6 __libpthread_version_placeholder F |
