summaryrefslogtreecommitdiff
path: root/sysdeps/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r--sysdeps/pthread/Makefile4
-rw-r--r--sysdeps/pthread/tss_set.c11
2 files changed, 12 insertions, 3 deletions
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