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 | 64a8990bdcb7f7259eb8445e8a7846345869f669 (patch) | |
tree | 052e00659387eabeb8f0b5c462ddcc2c480a6be4 /nptl | |
parent | aae43acfd14654d8733f022cd7b44f1636452db9 (diff) | |
download | glibc-64a8990bdcb7f7259eb8445e8a7846345869f669.zip glibc-64a8990bdcb7f7259eb8445e8a7846345869f669.tar.gz glibc-64a8990bdcb7f7259eb8445e8a7846345869f669.tar.bz2 |
nptl: Move pthread_setspecific, __pthread_setspecific into libc
The symbols have been moved using scripts/move-symbol-to-libc.py.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 6 | ||||
-rw-r--r-- | nptl/nptl-init.c | 1 | ||||
-rw-r--r-- | nptl/pthreadP.h | 2 | ||||
-rw-r--r-- | nptl/pthread_setspecific.c | 20 |
5 files changed, 22 insertions, 9 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 6c8bd99..4c7531e 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -88,6 +88,7 @@ routines = \ pthread_setcancelstate \ pthread_setcanceltype \ pthread_setschedparam \ + pthread_setspecific \ pthread_sigmask \ unwind \ @@ -191,7 +192,6 @@ libpthread-routines = \ pthread_setconcurrency \ pthread_setname \ pthread_setschedprio \ - pthread_setspecific \ pthread_sigqueue \ pthread_spin_destroy \ pthread_spin_init \ diff --git a/nptl/Versions b/nptl/Versions index 728aa37..a511b6e 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -3,6 +3,7 @@ libc { __pthread_getspecific; __pthread_key_create; __pthread_once; + __pthread_setspecific; _pthread_cleanup_pop; _pthread_cleanup_pop_restore; _pthread_cleanup_push; @@ -42,6 +43,7 @@ libc { pthread_setcancelstate; pthread_setcanceltype; pthread_setschedparam; + pthread_setspecific; pthread_sigmask; } GLIBC_2.1 { @@ -94,11 +96,13 @@ libc { __pthread_getspecific; __pthread_key_create; __pthread_once; + __pthread_setspecific; pthread_getspecific; pthread_key_create; pthread_kill; pthread_mutex_consistent; pthread_once; + pthread_setspecific; } GLIBC_PRIVATE { __futex_abstimed_wait64; @@ -152,7 +156,6 @@ libpthread { __pthread_mutexattr_destroy; __pthread_mutexattr_init; __pthread_mutexattr_settype; - __pthread_setspecific; _exit; flockfile; ftrylockfile; @@ -177,7 +180,6 @@ libpthread { pthread_mutexattr_getkind_np; pthread_mutexattr_init; pthread_mutexattr_setkind_np; - pthread_setspecific; pthread_sigmask; pthread_testcancel; sem_destroy; diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 7c1c871..1e57ff2 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_setspecific = __pthread_setspecific, .ptr__nptl_setxid = __nptl_setxid, }; # define ptr_pthread_functions &pthread_functions diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index a8241a4..2f3661c 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -526,6 +526,7 @@ 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); +libc_hidden_proto (__pthread_setspecific) extern int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)); libc_hidden_proto (__pthread_once) @@ -560,7 +561,6 @@ hidden_proto (__pthread_mutex_unlock) hidden_proto (__pthread_rwlock_rdlock) hidden_proto (__pthread_rwlock_wrlock) hidden_proto (__pthread_rwlock_unlock) -hidden_proto (__pthread_setspecific) hidden_proto (__pthread_testcancel) hidden_proto (__pthread_mutexattr_init) hidden_proto (__pthread_mutexattr_settype) diff --git a/nptl/pthread_setspecific.c b/nptl/pthread_setspecific.c index a6e84cd..fdcab3b 100644 --- a/nptl/pthread_setspecific.c +++ b/nptl/pthread_setspecific.c @@ -19,10 +19,10 @@ #include <errno.h> #include <stdlib.h> #include "pthreadP.h" - +#include <shlib-compat.h> int -__pthread_setspecific (pthread_key_t key, const void *value) +___pthread_setspecific (pthread_key_t key, const void *value) { struct pthread *self; unsigned int idx1st; @@ -89,5 +89,17 @@ __pthread_setspecific (pthread_key_t key, const void *value) return 0; } -weak_alias (__pthread_setspecific, pthread_setspecific) -hidden_def (__pthread_setspecific) +versioned_symbol (libc, ___pthread_setspecific, __pthread_setspecific, + GLIBC_2_34); +libc_hidden_ver (___pthread_setspecific, __pthread_setspecific) + +/* Several aliases for setting different symbol versions. */ + +versioned_symbol (libc, ___pthread_setspecific, pthread_setspecific, + GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_setspecific, __pthread_setspecific, + GLIBC_2_0); +compat_symbol (libpthread, ___pthread_setspecific, pthread_setspecific, + GLIBC_2_0); +#endif |