diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:51 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-04-21 19:49:51 +0200 |
commit | eb29dcde31e7b6f07e7acda161e85d2be69652e4 (patch) | |
tree | 763b41f1d40d74c8ae84d3c2622ef5709644b820 /sysdeps/nptl/libc-lockP.h | |
parent | 9ce44f46754cc529d54418615862e7e27cc82f09 (diff) | |
download | glibc-eb29dcde31e7b6f07e7acda161e85d2be69652e4.tar.gz glibc-eb29dcde31e7b6f07e7acda161e85d2be69652e4.tar.xz glibc-eb29dcde31e7b6f07e7acda161e85d2be69652e4.zip |
nptl: Move rwlock functions with forwarders into libc
The forwarders were only used internally, so new symbol versions are needed. All symbols are moved at once because the forwarders are no-ops if libpthread is not loaded, leading to inconsistencies in case of a partial migration. The symbols __pthread_rwlock_rdlock, __pthread_rwlock_unlock, __pthread_rwlock_wrlock, pthread_rwlock_rdlock, pthread_rwlock_unlock, pthread_rwlock_wrlock have been moved using scripts/move-symbol-to-libc.py. The __ symbol variants are turned into compat symbols, which is why they do not receive a GLIBC_2.34 version.
Diffstat (limited to 'sysdeps/nptl/libc-lockP.h')
-rw-r--r-- | sysdeps/nptl/libc-lockP.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h index 10a24568a9..89910560fa 100644 --- a/sysdeps/nptl/libc-lockP.h +++ b/sysdeps/nptl/libc-lockP.h @@ -167,10 +167,8 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0"); # define __libc_lock_lock(NAME) \ __libc_maybe_call (__pthread_mutex_lock, (&(NAME)), 0) #endif -#define __libc_rwlock_rdlock(NAME) \ - __libc_ptf_call (__pthread_rwlock_rdlock, (&(NAME)), 0) -#define __libc_rwlock_wrlock(NAME) \ - __libc_ptf_call (__pthread_rwlock_wrlock, (&(NAME)), 0) +#define __libc_rwlock_rdlock(NAME) __pthread_rwlock_rdlock (&(NAME)) +#define __libc_rwlock_wrlock(NAME) __pthread_rwlock_wrlock (&(NAME)) /* Try to lock the named lock variable. */ #if IS_IN (libc) || IS_IN (libpthread) @@ -199,8 +197,7 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0"); # define __libc_lock_unlock(NAME) \ __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0) #endif -#define __libc_rwlock_unlock(NAME) \ - __libc_ptf_call (__pthread_rwlock_unlock, (&(NAME)), 0) +#define __libc_rwlock_unlock(NAME) __pthread_rwlock_unlock (&(NAME)) #ifdef SHARED # define __rtld_lock_default_lock_recursive(lock) \ @@ -299,15 +296,15 @@ extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, 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); - +libc_hidden_proto (__pthread_rwlock_unlock) extern int __pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)); libc_hidden_proto (__pthread_once) @@ -333,11 +330,8 @@ weak_extern (__pthread_mutexattr_destroy) weak_extern (__pthread_mutexattr_settype) weak_extern (__pthread_rwlock_init) weak_extern (__pthread_rwlock_destroy) -weak_extern (__pthread_rwlock_rdlock) weak_extern (__pthread_rwlock_tryrdlock) -weak_extern (__pthread_rwlock_wrlock) weak_extern (__pthread_rwlock_trywrlock) -weak_extern (__pthread_rwlock_unlock) weak_extern (__pthread_initialize) weak_extern (__pthread_atfork) # else @@ -350,11 +344,8 @@ weak_extern (__pthread_atfork) # pragma weak __pthread_mutexattr_destroy # pragma weak __pthread_mutexattr_settype # pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock # pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock # pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock # pragma weak __pthread_initialize # pragma weak __pthread_atfork # endif |