about summary refs log tree commit diff
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
commit9ce44f46754cc529d54418615862e7e27cc82f09 (patch)
tree47f6529fcc8f5d748ee347c96aeec7d345783e61 /nptl
parent64a8990bdcb7f7259eb8445e8a7846345869f669 (diff)
downloadglibc-9ce44f46754cc529d54418615862e7e27cc82f09.tar.gz
glibc-9ce44f46754cc529d54418615862e7e27cc82f09.tar.xz
glibc-9ce44f46754cc529d54418615862e7e27cc82f09.zip
nptl: Move pthread_key_delete into libc.
The symbol was moved using scripts/move-symbol-to-libc.py.

tss_delete (still in libpthread) uses the __pthread_key_create
alias, so that is now exported under GLIBC_PRIVATE.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions4
-rw-r--r--nptl/pthreadP.h1
-rw-r--r--nptl/pthread_key_delete.c16
4 files changed, 18 insertions, 5 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 4c7531eb0c..df3423f5bf 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -80,6 +80,7 @@ routines = \
   pthread_getschedparam \
   pthread_getspecific \
   pthread_key_create \
+  pthread_key_delete \
   pthread_keys \
   pthread_kill \
   pthread_mutex_consistent \
@@ -146,7 +147,6 @@ libpthread-routines = \
   pthread_getname \
   pthread_join \
   pthread_join_common \
-  pthread_key_delete \
   pthread_kill_other_threads \
   pthread_mutex_cond_lock \
   pthread_mutex_conf \
diff --git a/nptl/Versions b/nptl/Versions
index a511b6e4f2..d32b554c05 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -33,6 +33,7 @@ libc {
     pthread_getschedparam;
     pthread_getspecific;
     pthread_key_create;
+    pthread_key_delete;
     pthread_kill;
     pthread_mutex_destroy;
     pthread_mutex_init;
@@ -99,6 +100,7 @@ libc {
     __pthread_setspecific;
     pthread_getspecific;
     pthread_key_create;
+    pthread_key_delete;
     pthread_kill;
     pthread_mutex_consistent;
     pthread_once;
@@ -133,6 +135,7 @@ libc {
     __pthread_exit;
     __pthread_force_elision;
     __pthread_getattr_default_np;
+    __pthread_key_delete;
     __pthread_keys;
     __pthread_setcancelstate;
     __pthread_unwind;
@@ -169,7 +172,6 @@ libpthread {
     pthread_create;
     pthread_detach;
     pthread_join;
-    pthread_key_delete;
     pthread_kill_other_threads_np;
     pthread_mutex_destroy;
     pthread_mutex_init;
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 2f3661cc4f..f09757bb26 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -523,6 +523,7 @@ extern int __pthread_condattr_destroy (pthread_condattr_t *attr);
 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);
+libc_hidden_proto (__pthread_key_delete)
 extern void *__pthread_getspecific (pthread_key_t key);
 libc_hidden_proto (__pthread_getspecific)
 extern int __pthread_setspecific (pthread_key_t key, const void *value);
diff --git a/nptl/pthread_key_delete.c b/nptl/pthread_key_delete.c
index b9018306b1..93eedb92b8 100644
--- a/nptl/pthread_key_delete.c
+++ b/nptl/pthread_key_delete.c
@@ -19,10 +19,10 @@
 #include <errno.h>
 #include "pthreadP.h"
 #include <atomic.h>
-
+#include <shlib-compat.h>
 
 int
-__pthread_key_delete (pthread_key_t key)
+___pthread_key_delete (pthread_key_t key)
 {
   int result = EINVAL;
 
@@ -39,4 +39,14 @@ __pthread_key_delete (pthread_key_t key)
 
   return result;
 }
-weak_alias (__pthread_key_delete, pthread_key_delete)
+versioned_symbol (libc, ___pthread_key_delete, pthread_key_delete,
+		  GLIBC_2_34);
+libc_hidden_ver (___pthread_key_delete, __pthread_key_delete)
+
+versioned_symbol (libc, ___pthread_key_delete, __pthread_key_delete,
+		  GLIBC_PRIVATE);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_key_delete, pthread_key_delete,
+	       GLIBC_2_0);
+#endif