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 | aae43acfd14654d8733f022cd7b44f1636452db9 (patch) | |
| tree | 73af98b711ab1482caa86406b9fcdb8b1b561912 | |
| parent | 6f009ea9848a473578ccdebc0dc1ccf50debc047 (diff) | |
| download | glibc-aae43acfd14654d8733f022cd7b44f1636452db9.tar.xz glibc-aae43acfd14654d8733f022cd7b44f1636452db9.zip | |
nptl: Move pthread_getspecific, __pthread_getspecific into libc
The symbols have been moved using scripts/move-symbol-to-libc.py.
68 files changed, 148 insertions, 70 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index ed417970af..6c8bd99946 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -78,6 +78,7 @@ routines = \ pthread_getaffinity \ pthread_getattr_np \ pthread_getschedparam \ + pthread_getspecific \ pthread_key_create \ pthread_keys \ pthread_kill \ @@ -142,7 +143,6 @@ libpthread-routines = \ pthread_getconcurrency \ pthread_getcpuclockid \ pthread_getname \ - pthread_getspecific \ pthread_join \ pthread_join_common \ pthread_key_delete \ diff --git a/nptl/Versions b/nptl/Versions index 5df4759c1c..728aa37946 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -1,5 +1,6 @@ libc { GLIBC_2.0 { + __pthread_getspecific; __pthread_key_create; __pthread_once; _pthread_cleanup_pop; @@ -29,6 +30,7 @@ libc { pthread_equal; pthread_exit; pthread_getschedparam; + pthread_getspecific; pthread_key_create; pthread_kill; pthread_mutex_destroy; @@ -89,8 +91,10 @@ libc { } GLIBC_2.34 { __pthread_cleanup_routine; + __pthread_getspecific; __pthread_key_create; __pthread_once; + pthread_getspecific; pthread_key_create; pthread_kill; pthread_mutex_consistent; @@ -140,7 +144,6 @@ libpthread { __errno_location; __h_errno_location; __pthread_atfork; - __pthread_getspecific; __pthread_mutex_destroy; __pthread_mutex_init; __pthread_mutex_lock; @@ -162,7 +165,6 @@ libpthread { pthread_cond_wait; pthread_create; pthread_detach; - pthread_getspecific; pthread_join; pthread_key_delete; pthread_kill_other_threads_np; diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index c2cb8acdaa..7c1c871821 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -69,7 +69,6 @@ static const struct pthread_functions pthread_functions = .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock, .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock, .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock, - .ptr___pthread_getspecific = __pthread_getspecific, .ptr___pthread_setspecific = __pthread_setspecific, .ptr__nptl_setxid = __nptl_setxid, }; diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 32b1c102a6..a8241a4725 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -524,6 +524,7 @@ extern int __pthread_condattr_init (pthread_condattr_t *attr); extern int __pthread_key_create (pthread_key_t *key, void (*destr) (void *)); extern int __pthread_key_delete (pthread_key_t key); extern void *__pthread_getspecific (pthread_key_t key); +libc_hidden_proto (__pthread_getspecific) extern int __pthread_setspecific (pthread_key_t key, const void *value); extern int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)); @@ -559,7 +560,6 @@ hidden_proto (__pthread_mutex_unlock) hidden_proto (__pthread_rwlock_rdlock) hidden_proto (__pthread_rwlock_wrlock) hidden_proto (__pthread_rwlock_unlock) -hidden_proto (__pthread_getspecific) hidden_proto (__pthread_setspecific) hidden_proto (__pthread_testcancel) hidden_proto (__pthread_mutexattr_init) diff --git a/nptl/pthread_getspecific.c b/nptl/pthread_getspecific.c index d38847e1c2..230497a84d 100644 --- a/nptl/pthread_getspecific.c +++ b/nptl/pthread_getspecific.c @@ -18,10 +18,10 @@ #include <stdlib.h> #include "pthreadP.h" - +#include <shlib-compat.h> void * -__pthread_getspecific (pthread_key_t key) +___pthread_getspecific (pthread_key_t key) { struct pthread_key_data *data; @@ -63,5 +63,15 @@ __pthread_getspecific (pthread_key_t key) return result; } -weak_alias (__pthread_getspecific, pthread_getspecific) -hidden_def (__pthread_getspecific) +versioned_symbol (libc, ___pthread_getspecific, __pthread_getspecific, + GLIBC_2_34); +libc_hidden_ver (___pthread_getspecific, __pthread_getspecific) + +versioned_symbol (libc, ___pthread_getspecific, pthread_getspecific, + GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_getspecific, __pthread_getspecific, + GLIBC_2_0); +compat_symbol (libpthread, ___pthread_getspecific, pthread_getspecific, + GLIBC_2_0); +#endif diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h index 64c7a99bbf..bf92a035f8 100644 --- a/sysdeps/nptl/libc-lockP.h +++ b/sysdeps/nptl/libc-lockP.h @@ -339,7 +339,6 @@ weak_extern (__pthread_rwlock_wrlock) weak_extern (__pthread_rwlock_trywrlock) weak_extern (__pthread_rwlock_unlock) weak_extern (__pthread_setspecific) -weak_extern (__pthread_getspecific) weak_extern (__pthread_initialize) weak_extern (__pthread_atfork) # else @@ -358,7 +357,6 @@ weak_extern (__pthread_atfork) # pragma weak __pthread_rwlock_trywrlock # pragma weak __pthread_rwlock_unlock # pragma wea |
