diff options
65 files changed, 82 insertions, 71 deletions
diff --git a/nptl/Versions b/nptl/Versions index 487e251445..bd3bc81cb0 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -147,6 +147,7 @@ libc { tss_create; tss_delete; tss_get; + tss_set; } GLIBC_2.30 { pthread_cond_clockwait; @@ -165,7 +166,6 @@ libc { __pthread_key_create; __pthread_mutex_lock; __pthread_mutex_unlock; - __pthread_setspecific; call_once; cnd_broadcast; cnd_destroy; @@ -217,6 +217,7 @@ libc { tss_create; tss_delete; tss_get; + tss_set; } GLIBC_PRIVATE { __futex_abstimed_wait64; @@ -395,7 +396,6 @@ libpthread { thrd_create; thrd_detach; thrd_join; - tss_set; } GLIBC_2.30 { diff --git a/nptl/pthread_setspecific.c b/nptl/pthread_setspecific.c index fdcab3b6d9..820145a3d1 100644 --- a/nptl/pthread_setspecific.c +++ b/nptl/pthread_setspecific.c @@ -89,14 +89,13 @@ ___pthread_setspecific (pthread_key_t key, const void *value) return 0; } -versioned_symbol (libc, ___pthread_setspecific, __pthread_setspecific, +versioned_symbol (libc, ___pthread_setspecific, pthread_setspecific, GLIBC_2_34); libc_hidden_ver (___pthread_setspecific, __pthread_setspecific) +#ifndef SHARED +strong_alias (___pthread_setspecific, __pthread_setspecific) +#endif -/* 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); diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 493087732d..54bb11bab9 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -31,8 +31,7 @@ headers += threads.h routines += thrd_current thrd_equal thrd_sleep thrd_yield -libpthread-routines += thrd_create thrd_detach thrd_join \ - tss_set +libpthread-routines += thrd_create thrd_detach thrd_join $(libpthread-routines-var) += \ call_once \ @@ -52,6 +51,7 @@ $(libpthread-routines-var) += \ tss_create \ tss_delete \ tss_get \ + tss_set \ 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_set.c b/sysdeps/pthread/tss_set.c index 66b662acbd..d021302b0c 100644 --- a/sysdeps/pthread/tss_set.c +++ b/sysdeps/pthread/tss_set.c @@ -16,11 +16,20 @@ 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_set (tss_t tss_id, void *val) +__tss_set (tss_t tss_id, void *val) { int err_code = __pthread_setspecific (tss_id, val); return thrd_err_map (err_code); } +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __tss_set, tss_set, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34) +compat_symbol (libpthread, __tss_set, tss_set, GLIBC_2_28); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__tss_set, tss_set) +#endif diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist index 62ee51335d..ff73120781 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist @@ -2222,6 +2222,7 @@ GLIBC_2.28 thrd_yield 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 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 @@ -2258,7 +2259,6 @@ GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_key_create F GLIBC_2.34 __pthread_mutex_lock F GLIBC_2.34 __pthread_mutex_unlock F -GLIBC_2.34 __pthread_setspecific F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 call_once F GLIBC_2.34 cnd_broadcast F @@ -2314,3 +2314,4 @@ GLIBC_2.34 thrd_exit F GLIBC_2.34 tss_create F GLIBC_2.34 tss_delete F GLIBC_2.34 tss_get F +GLIBC_2.34 tss_set F diff --git a/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist b/sysdeps/unix/sysv/linux/aarch64/libpthread.abilist index 3408697ac1..388350b3c5 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_set F GLIBC_2.30 pthread_rwlock_clockrdlock F GLIBC_2.30 pthread_rwlock_clockwrlock F GLIBC_2.30 sem_clockwait F diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist index 16bf215d70..f37507a205 100644 --- a/sysdeps/unix/sysv/linux/alpha/libc.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist @@ -2115,6 +2115,7 @@ GLIBC_2.28 thrd_yield 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 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 @@ -2339,7 +2340,6 @@ GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_key_create F GLIBC_2.34 __pthread_mutex_lock F GLIBC_2.34 __pthread_mutex_unlock F -GLIBC_2.34 __pthread_setspecific F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 call_once F GLIBC_2.34 cnd_broadcast F @@ -2395,6 +2395,7 @@ GLIBC_2.34 thrd_exit F GLIBC_2.34 tss_create F GLIBC_2.34 tss_delete F GLIBC_2.34 tss_get F +GLIBC_2.34 tss_set 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 f6871dd45e..6c3551b328 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_set F GLIBC_2.3.2 __libpthread_version_placeholder F GLIBC_2.3.3 __pthread_register_cancel F GLIBC_2.3.3 __pthread_register_cancel_defer F |
