aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-21 19:49:51 +0200
commit64a8990bdcb7f7259eb8445e8a7846345869f669 (patch)
tree052e00659387eabeb8f0b5c462ddcc2c480a6be4 /nptl
parentaae43acfd14654d8733f022cd7b44f1636452db9 (diff)
downloadglibc-64a8990bdcb7f7259eb8445e8a7846345869f669.tar
glibc-64a8990bdcb7f7259eb8445e8a7846345869f669.tar.gz
glibc-64a8990bdcb7f7259eb8445e8a7846345869f669.tar.bz2
glibc-64a8990bdcb7f7259eb8445e8a7846345869f669.zip
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/Makefile2
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/nptl-init.c1
-rw-r--r--nptl/pthreadP.h2
-rw-r--r--nptl/pthread_setspecific.c20
5 files changed, 22 insertions, 9 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 6c8bd99946..4c7531eb0c 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 728aa37946..a511b6e4f2 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 7c1c871821..1e57ff20d0 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 a8241a4725..2f3661cc4f 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 a6e84cd001..fdcab3b6d9 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