diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 3 | ||||
-rw-r--r-- | nptl/pthreadP.h | 2 | ||||
-rw-r--r-- | nptl/pthread_rwlock_timedrdlock.c | 23 |
4 files changed, 20 insertions, 10 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 281c771ebb..dce39abbb1 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -125,6 +125,7 @@ routines = \ pthread_rwlock_destroy \ pthread_rwlock_init \ pthread_rwlock_rdlock \ + pthread_rwlock_timedrdlock \ pthread_rwlock_unlock \ pthread_rwlock_wrlock \ pthread_self \ @@ -182,7 +183,6 @@ libpthread-routines = \ pthread_getname \ pthread_join \ pthread_join_common \ - pthread_rwlock_timedrdlock \ pthread_rwlock_timedwrlock \ pthread_rwlock_tryrdlock \ pthread_rwlock_trywrlock \ diff --git a/nptl/Versions b/nptl/Versions index 0e9e3326eb..5ffbfc11d9 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -88,6 +88,7 @@ libc { pthread_spin_lock; pthread_spin_trylock; pthread_spin_unlock; + pthread_rwlock_timedrdlock; } GLIBC_2.2.3 { pthread_getattr_np; @@ -214,6 +215,7 @@ libc { pthread_rwlock_clockwrlock; pthread_rwlock_destroy; pthread_rwlock_rdlock; + pthread_rwlock_timedrdlock; pthread_rwlock_unlock; pthread_rwlock_wrlock; pthread_setspecific; @@ -341,7 +343,6 @@ libpthread { pthread_barrierattr_init; pthread_barrierattr_setpshared; pthread_getcpuclockid; - pthread_rwlock_timedrdlock; pthread_rwlock_timedwrlock; pthread_yield; sem_timedwait; diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 70e17cb78f..f51a915f1e 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -512,7 +512,7 @@ extern int __pthread_rwlock_clockwrlock64 (pthread_rwlock_t *rwlock, libc_hidden_proto (__pthread_rwlock_clockwrlock64) extern int __pthread_rwlock_timedrdlock64 (pthread_rwlock_t *rwlock, const struct __timespec64 *abstime); -libpthread_hidden_proto (__pthread_rwlock_timedrdlock64) +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) diff --git a/nptl/pthread_rwlock_timedrdlock.c b/nptl/pthread_rwlock_timedrdlock.c index db02ee7f5c..dd9b7cb0a2 100644 --- a/nptl/pthread_rwlock_timedrdlock.c +++ b/nptl/pthread_rwlock_timedrdlock.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_timedrdlock64 (pthread_rwlock_t *rwlock, - const struct __timespec64 *abstime) +___pthread_rwlock_timedrdlock64 (pthread_rwlock_t *rwlock, + const struct __timespec64 *abstime) { return __pthread_rwlock_rdlock_full64 (rwlock, CLOCK_REALTIME, abstime); } -#if __TIMESIZE != 64 -libpthread_hidden_def (__pthread_rwlock_timedrdlock64) +#if __TIMESIZE == 64 +strong_alias (___pthread_rwlock_timedrdlock64, ___pthread_rwlock_timedrdlock) +#else /* __TIMESPEC64 != 64 */ +libc_hidden_ver (___pthread_rwlock_timedrdlock64, + __pthread_rwlock_timedrdlock64) int -__pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock, - const struct timespec *abstime) +___pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock, + const struct timespec *abstime) { struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime); return __pthread_rwlock_timedrdlock64 (rwlock, &ts64); } +#endif /* __TIMESPEC64 != 64 */ +versioned_symbol (libc, ___pthread_rwlock_timedrdlock, + pthread_rwlock_timedrdlock, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_rwlock_timedrdlock, + pthread_rwlock_timedrdlock, GLIBC_2_2); #endif -weak_alias (__pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock) |