diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-05-03 09:10:57 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-05-03 09:18:12 +0200 |
| commit | e7d2d48e560a2091e2a03c527c333cd7b5618b25 (patch) | |
| tree | 133ae917524140c08d64b3b81029192970f3136d | |
| parent | 2392feb17188fed30bc16fd032e0a43e022b8ead (diff) | |
| download | glibc-e7d2d48e560a2091e2a03c527c333cd7b5618b25.tar.xz glibc-e7d2d48e560a2091e2a03c527c333cd7b5618b25.zip | |
nptl: Move pthread_rwlock_timedwrlock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
65 files changed, 84 insertions, 39 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index dce39abbb1..cbc5309365 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -126,6 +126,7 @@ routines = \ pthread_rwlock_init \ pthread_rwlock_rdlock \ pthread_rwlock_timedrdlock \ + pthread_rwlock_timedwrlock \ pthread_rwlock_unlock \ pthread_rwlock_wrlock \ pthread_self \ @@ -183,7 +184,6 @@ libpthread-routines = \ pthread_getname \ pthread_join \ pthread_join_common \ - pthread_rwlock_timedwrlock \ pthread_rwlock_tryrdlock \ pthread_rwlock_trywrlock \ pthread_rwlockattr_destroy \ diff --git a/nptl/Versions b/nptl/Versions index 5ffbfc11d9..98008fd829 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -89,6 +89,7 @@ libc { pthread_spin_trylock; pthread_spin_unlock; pthread_rwlock_timedrdlock; + pthread_rwlock_timedwrlock; } GLIBC_2.2.3 { pthread_getattr_np; @@ -216,6 +217,7 @@ libc { pthread_rwlock_destroy; pthread_rwlock_rdlock; pthread_rwlock_timedrdlock; + pthread_rwlock_timedwrlock; pthread_rwlock_unlock; pthread_rwlock_wrlock; pthread_setspecific; @@ -343,7 +345,6 @@ libpthread { pthread_barrierattr_init; pthread_barrierattr_setpshared; pthread_getcpuclockid; - pthread_rwlock_timedwrlock; pthread_yield; sem_timedwait; } diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index f51a915f1e..00d2cfe764 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -515,7 +515,7 @@ extern int __pthread_rwlock_timedrdlock64 (pthread_rwlock_t *rwlock, libc_hidden_proto (__pthread_rwlock_timedrdlock64) extern int __pthread_rwlock_timedwrlock64 (pthread_rwlock_t *rwlock, const struct __timespec64 *abstime); -libpthread_hidden_proto (__pthread_rwlock_timedwrlock64) +libc_hidden_proto (__pthread_rwlock_timedwrlock64) extern int __pthread_mutex_clocklock64 (pthread_mutex_t *mutex, clockid_t clockid, const struct __timespec64 *abstime); diff --git a/nptl/pthread_rwlock_timedwrlock.c b/nptl/pthread_rwlock_timedwrlock.c index 14470e3f07..e660a544cd 100644 --- a/nptl/pthread_rwlock_timedwrlock.c +++ b/nptl/pthread_rwlock_timedwrlock.c @@ -17,25 +17,34 @@ <https://www.gnu.org/licenses/>. */ #include "pthread_rwlock_common.c" +#include <shlib-compat.h> /* See pthread_rwlock_common.c. */ int -__pthread_rwlock_timedwrlock64 (pthread_rwlock_t *rwlock, - const struct __timespec64 *abstime) +___pthread_rwlock_timedwrlock64 (pthread_rwlock_t *rwlock, + const struct __timespec64 *abstime) { return __pthread_rwlock_wrlock_full64 (rwlock, CLOCK_REALTIME, abstime); } -#if __TIMESIZE != 64 -libpthread_hidden_def (__pthread_rwlock_timedwrlock64) +#if __TIMESIZE == 64 +strong_alias (___pthread_rwlock_timedwrlock64, ___pthread_rwlock_timedwrlock) +#else /* __TIMESPEC64 != 64 */ +libc_hidden_ver (___pthread_rwlock_timedwrlock64, + __pthread_rwlock_timedwrlock64) int -__pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock, - const struct timespec *abstime) +___pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock, + const struct timespec *abstime) { struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); return __pthread_rwlock_timedwrlock64 (rwlock, &ts64); } +#endif /* __TIMESPEC64 != 64 */ +versioned_symbol (libc, ___pthread_rwlock_timedwrlock, + pthread_rwlock_timedwrlock, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_rwlock_timedwrlock, + pthread_rwlock_timedwrlock, GLIBC_2_2); #endif -weak_alias (__pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock) diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 1151c1542a..7d707fb143 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -1506,6 +1506,7 @@ GLIBC_2.17 pthread_rwlock_destroy F GLIBC_2.17 pthread_rwlock_init F GLIBC_2.17 pthread_rwlock_rdlock F GLIBC_2.17 pthread_rwlock_timedrdlock F +GLIBC_2.17 pthread_rwlock_timedwrlock F GLIBC_2.17 pthread_rwlock_unlock F GLIBC_2.17 pthread_rwlock_wrlock F GLIBC_2.17 pthread_self F @@ -2314,6 +2315,7 @@ GLIBC_2.34 pthread_rwlock_destroy F GLIBC_2.34 pthread_rwlock_init F GLIBC_2.34 pthread_rwlock_rdlock F GLIBC_2.34 pthread_rwlock_timedrdlock F +GLIBC_2.34 pthread_rwlock_timedwrlock F GLIBC_2.34 pthread_rwlock_unlock F GLIBC_2.34 pthread_rwlock_wrlock F GLIBC_2.34 pthread_setspecific F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index 76a85b1fc6..37bbc8abbd 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -34,7 +34,6 @@ GLIBC_2.17 pthread_getconcurrency F GLIBC_2.17 pthread_getcpuclockid F GLIBC_2.17 pthread_getname_np F GLIBC_2.17 pthread_join F -GLIBC_2.17 pthread_rwlock_timedwrlock F GLIBC_2.17 pthread_rwlock_tryrdlock F GLIBC_2.17 pthread_rwlock_trywrlock F GLIBC_2.17 pthread_rwlockattr_destroy F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 26751ac2ce..060aac7e7f 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -1988,6 +1988,7 @@ GLIBC_2.2 pthread_mutex_timedlock F GLIBC_2.2 pthread_mutexattr_getpshared F GLIBC_2.2 pthread_mutexattr_setpshared F GLIBC_2.2 pthread_rwlock_timedrdlock F +GLIBC_2.2 pthread_rwlock_timedwrlock F GLIBC_2.2 pthread_spin_destroy F< |
