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 | |
| parent | 9ce44f46754cc529d54418615862e7e27cc82f09 (diff) | |
| download | 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')
63 files changed, 294 insertions, 192 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 diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h index 2d89013ff5..8535e142d5 100644 --- a/sysdeps/nptl/pthread-functions.h +++ b/sysdeps/nptl/pthread-functions.h @@ -46,9 +46,6 @@ struct pthread_functions const pthread_mutexattr_t *); int (*ptr_pthread_mutex_lock) (pthread_mutex_t *); int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *); - int (*ptr___pthread_rwlock_rdlock) (pthread_rwlock_t *); - int (*ptr___pthread_rwlock_wrlock) (pthread_rwlock_t *); - int (*ptr___pthread_rwlock_unlock) (pthread_rwlock_t *); int (*ptr__nptl_setxid) (struct xid_command *); }; diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index f631286a49..26dd0b3959 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -342,6 +342,9 @@ GLIBC_2.17 __pthread_cleanup_routine F GLIBC_2.17 __pthread_getspecific F GLIBC_2.17 __pthread_key_create F GLIBC_2.17 __pthread_once F +GLIBC_2.17 __pthread_rwlock_rdlock F +GLIBC_2.17 __pthread_rwlock_unlock F +GLIBC_2.17 __pthread_rwlock_wrlock F GLIBC_2.17 __pthread_setspecific F GLIBC_2.17 __pthread_unwind_next F GLIBC_2.17 __ptsname_r_chk F @@ -1464,6 +1467,9 @@ GLIBC_2.17 pthread_mutex_init F GLIBC_2.17 pthread_mutex_lock F GLIBC_2.17 pthread_mutex_unlock F GLIBC_2.17 pthread_once F +GLIBC_2.17 pthread_rwlock_rdlock F +GLIBC_2.17 pthread_rwlock_unlock F +GLIBC_2.17 pthread_rwlock_wrlock F GLIBC_2.17 pthread_self F GLIBC_2.17 pthread_setcancelstate F GLIBC_2.17 pthread_setcanceltype F @@ -2203,4 +2209,7 @@ GLIBC_2.34 pthread_key_delete F GLIBC_2.34 pthread_kill F GLIBC_2.34 pthread_mutex_consistent F GLIBC_2.34 pthread_once F +GLIBC_2.34 pthread_rwlock_rdlock 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 28f454bbf7..3f0247fcec 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist @@ -15,11 +15,8 @@ GLIBC_2.17 __pthread_register_cancel F GLIBC_2.17 __pthread_register_cancel_defer F 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_tryrdlock F GLIBC_2.17 __pthread_rwlock_trywrlock F -GLIBC_2.17 __pthread_rwlock_unlock F -GLIBC_2.17 __pthread_rwlock_wrlock F GLIBC_2.17 __pthread_unregister_cancel F GLIBC_2.17 __pthread_unregister_cancel_restore F GLIBC_2.17 __res_state F @@ -84,13 +81,10 @@ GLIBC_2.17 pthread_mutexattr_setrobust_np F GLIBC_2.17 pthread_mutexattr_settype F 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_tryrdlock F GLIBC_2.17 pthread_rwlock_trywrlock F -GLIBC_2.17 pthread_rwlock_unlock F -GLIBC_2.17 pthread_rwlock_wrlock F GLIBC_2.17 pthread_rwlockattr_destroy F GLIBC_2.17 pthread_rwlockattr_getkind_np F |
