diff options
70 files changed, 350 insertions, 216 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index df3423f5bf..db1b2aad08 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -85,6 +85,9 @@ routines = \ pthread_kill \ pthread_mutex_consistent \ pthread_once \ + pthread_rwlock_rdlock \ + pthread_rwlock_unlock \ + pthread_rwlock_wrlock \ pthread_self \ pthread_setcancelstate \ pthread_setcanceltype \ @@ -174,13 +177,10 @@ libpthread-routines = \ pthread_rwlock_clockwrlock \ pthread_rwlock_destroy \ pthread_rwlock_init \ - pthread_rwlock_rdlock \ pthread_rwlock_timedrdlock \ pthread_rwlock_timedwrlock \ pthread_rwlock_tryrdlock \ pthread_rwlock_trywrlock \ - pthread_rwlock_unlock \ - pthread_rwlock_wrlock \ pthread_rwlockattr_destroy \ pthread_rwlockattr_getkind_np \ pthread_rwlockattr_getpshared \ diff --git a/nptl/Versions b/nptl/Versions index d32b554c05..b14f76aa41 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -49,6 +49,14 @@ libc { } GLIBC_2.1 { pthread_attr_init; + pthread_rwlock_rdlock; + pthread_rwlock_unlock; + pthread_rwlock_wrlock; + } + GLIBC_2.2 { + __pthread_rwlock_rdlock; + __pthread_rwlock_unlock; + __pthread_rwlock_wrlock; } GLIBC_2.2.3 { pthread_getattr_np; @@ -104,6 +112,9 @@ libc { pthread_kill; pthread_mutex_consistent; pthread_once; + pthread_rwlock_rdlock; + pthread_rwlock_unlock; + pthread_rwlock_wrlock; pthread_setspecific; } GLIBC_PRIVATE { @@ -205,11 +216,8 @@ libpthread { pthread_mutexattr_settype; pthread_rwlock_destroy; pthread_rwlock_init; - pthread_rwlock_rdlock; pthread_rwlock_tryrdlock; pthread_rwlock_trywrlock; - pthread_rwlock_unlock; - pthread_rwlock_wrlock; pthread_rwlockattr_destroy; pthread_rwlockattr_getkind_np; pthread_rwlockattr_getpshared; @@ -238,11 +246,8 @@ libpthread { GLIBC_2.2 { __pthread_rwlock_destroy; __pthread_rwlock_init; - __pthread_rwlock_rdlock; __pthread_rwlock_tryrdlock; __pthread_rwlock_trywrlock; - __pthread_rwlock_unlock; - __pthread_rwlock_wrlock; __res_state; pthread_attr_getstack; pthread_attr_setstack; diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 1e57ff20d0..fae0db383c 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -66,9 +66,6 @@ static const struct pthread_functions pthread_functions = .ptr_pthread_mutex_init = __pthread_mutex_init, .ptr_pthread_mutex_lock = __pthread_mutex_lock, .ptr_pthread_mutex_unlock = __pthread_mutex_unlock, - .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock, - .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock, - .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock, .ptr__nptl_setxid = __nptl_setxid, }; # define ptr_pthread_functions &pthread_functions diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index f09757bb26..2c59a1dc84 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -447,8 +447,10 @@ extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __attr); extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); +libc_hidden_proto (__pthread_rwlock_rdlock) extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); +libc_hidden_proto (__pthread_rwlock_wrlock) extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); extern int __pthread_cond_broadcast (pthread_cond_t *cond); @@ -559,8 +561,6 @@ hidden_proto (__pthread_mutex_destroy) hidden_proto (__pthread_mutex_lock) hidden_proto (__pthread_mutex_trylock) hidden_proto (__pthread_mutex_unlock) -hidden_proto (__pthread_rwlock_rdlock) -hidden_proto (__pthread_rwlock_wrlock) hidden_proto (__pthread_rwlock_unlock) hidden_proto (__pthread_testcancel) hidden_proto (__pthread_mutexattr_init) diff --git a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c index 0eeee50834..366883ea3d 100644 --- a/nptl/pthread_rwlock_rdlock.c +++ b/nptl/pthread_rwlock_rdlock.c @@ -20,7 +20,7 @@ /* See pthread_rwlock_common.c. */ int -__pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) +___pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) { LIBC_PROBE (rdlock_entry, 1, rwlock); @@ -28,6 +28,16 @@ __pthread_rwlock_rdlock (pthread_rwlock_t *rwlock) LIBC_PROBE (rdlock_acquire_read, 1, rwlock); return result; } +versioned_symbol (libc, ___pthread_rwlock_rdlock, pthread_rwlock_rdlock, + GLIBC_2_34); +strong_alias (___pthread_rwlock_rdlock, __pthread_rwlock_rdlock) +libc_hidden_ver (___pthread_rwlock_rdlock, __pthread_rwlock_rdlock) -weak_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock) -hidden_def (__pthread_rwlock_rdlock) +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_rwlock_rdlock, pthread_rwlock_rdlock, + GLIBC_2_1); +#endif +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_rwlock_rdlock, __pthread_rwlock_rdlock, + GLIBC_2_2); +#endif diff --git a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c index 356d63a045..6c0da9786d 100644 --- a/nptl/pthread_rwlock_unlock.c +++ b/nptl/pthread_rwlock_unlock.c @@ -27,7 +27,7 @@ < |
