aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-03 08:12:12 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-03 08:17:29 +0200
commite4036b1ce9fa2f4086b050eb946f169c11efad08 (patch)
tree25d5a0be4781c845ea666591677d5d2a462da65b
parent96e61709b49c3ebe4fa49c235ddafaad1f1dfc84 (diff)
downloadglibc-e4036b1ce9fa2f4086b050eb946f169c11efad08.tar.xz
glibc-e4036b1ce9fa2f4086b050eb946f169c11efad08.zip
nptl: Move tss_create into libc
The symbol was moved using scripts/move-symbol-to-libc.py. __pthread_key_create@@GLIBC_2.34 is no longer needed by glibc itself with this change, but __pthread_key_create is used by libstdc++, so it still has to be exported as a public symbol. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
-rw-r--r--nptl/Versions3
-rw-r--r--nptl/pthreadP.h1
-rw-r--r--sysdeps/pthread/Makefile3
-rw-r--r--sysdeps/pthread/tss_create.c11
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/arc/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/arc/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/csky/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/csky/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/i386/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/i386/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist1
65 files changed, 79 insertions, 32 deletions
diff --git a/nptl/Versions b/nptl/Versions
index 834fdbbd87..f267d4d1e7 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -144,6 +144,7 @@ libc {
thrd_exit;
thrd_sleep;
thrd_yield;
+ tss_create;
}
GLIBC_2.30 {
pthread_cond_clockwait;
@@ -212,6 +213,7 @@ libc {
pthread_spin_trylock;
pthread_spin_unlock;
thrd_exit;
+ tss_create;
}
GLIBC_PRIVATE {
__futex_abstimed_wait64;
@@ -391,7 +393,6 @@ libpthread {
thrd_create;
thrd_detach;
thrd_join;
- tss_create;
tss_delete;
tss_get;
tss_set;
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 3b070ee10d..d98bd11d6e 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -547,6 +547,7 @@ libc_hidden_proto (__pthread_mutex_timedlock)
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 *));
+libc_hidden_proto (__pthread_key_create)
extern int __pthread_key_delete (pthread_key_t key);
libc_hidden_proto (__pthread_key_delete)
extern void *__pthread_getspecific (pthread_key_t key);
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index 75a74be340..4b7e43078c 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -32,7 +32,7 @@ headers += threads.h
routines += thrd_current thrd_equal thrd_sleep thrd_yield
libpthread-routines += thrd_create thrd_detach thrd_join \
- tss_create tss_delete tss_get tss_set
+ tss_delete tss_get tss_set
$(libpthread-routines-var) += \
call_once \
@@ -49,6 +49,7 @@ $(libpthread-routines-var) += \
mtx_trylock \
mtx_unlock \
thrd_exit \
+ tss_create \
tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \
tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \
diff --git a/sysdeps/pthread/tss_create.c b/sysdeps/pthread/tss_create.c
index a059f39ac8..197f643401 100644
--- a/sysdeps/pthread/tss_create.c
+++ b/sysdeps/pthread/tss_create.c
@@ -16,10 +16,11 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <shlib-compat.h>
#include "thrd_priv.h"
int
-tss_create (tss_t *tss_id, tss_dtor_t destructor)
+__tss_create (tss_t *tss_id, tss_dtor_t destructor)
{
_Static_assert (sizeof (tss_t) == sizeof (pthread_key_t),
"sizeof (tss_t) != sizeof (pthread_key_t)");
@@ -31,3 +32,11 @@ tss_create (tss_t *tss_id, tss_dtor_t destructor)
int err_code = __pthread_key_create (tss_id, destructor);
return thrd_err_map (err_code);
}
+#if PTHREAD_IN_LIBC
+versioned_symbol (libc, __tss_create, tss_create, GLIBC_2_34);
+# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
+compat_symbol (libpthread, __tss_create, tss_create, GLIBC_2_28);
+# endif
+#else /* !PTHREAD_IN_LIBC */
+strong_alias (__tss_create, tss_create)
+#endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 9390752b11..22c83416d9 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2219,6 +2219,7 @@ GLIBC_2.28 thrd_equal F
GLIBC_2.28 thrd_exit F
GLIBC_2.28 thrd_sleep F
GLIBC_2.28 thrd_yield F
+GLIBC_2.28 tss_create F
GLIBC_2.29 getcpu F
GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
@@ -2309,3 +2310,4 @@ GLIBC_2.34 pthread_spin_lock F
GLIBC_2.34 pthread_spin_trylock F
GLIBC_2.34 pthread_spin_unlock F
GLIBC_2.34 thrd_exit F
+GLIBC_2.34 tss_create F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
index 2e044698b7..22d805d968 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.18 pthread_setattr_default_np F
GLIBC_2.28 thrd_create F
GLIBC_2.28 thrd_detach F
GLIBC_2.28 thrd_join F
-GLIBC_2.28 tss_create F
GLIBC_2.28 tss_delete F
GLIBC_2.28 tss_get F
GLIBC_2.28 tss_set F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 01830f4b8c..69246ca59d 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2112,6 +2112,7 @@ GLIBC_2.28 thrd_equal F
GLIBC_2.28 thrd_exit F
GLIBC_2.28 thrd_sleep F
GLIBC_2.28 thrd_yield F
+GLIBC_2.28 tss_create F
GLIBC_2.29 getcpu F
GLIBC_2.29 posix_spawn_file_actions_addchdir_np F
GLIBC_2.29 posix_spawn_file_actions_addfchdir_np F
@@ -2390,6 +2391,7 @@ GLIBC_2.34 pthread_spin_lock F
GLIBC_2.34 pthread_spin_trylock F
GLIBC_2.34 pthread_spin_unlock F
GLIBC_2.34 thrd_exit F
+GLIBC_2.34 tss_create F
GLIBC_2.4 _IO_fprintf F
GLIBC_2.4 _IO_printf F
GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
index 69716922ba..32f24fc73f 100644
--- a/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libpthread.abilist
@@ -72,7 +72,6 @@ GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 thrd_create F
GLIBC_2.28 thrd_detach F
GLIBC_2.28 thrd_join F
-GLIBC_2.28 tss_create F
GLIBC_2.28 tss_delete F