diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-03 08:12:12 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-03 08:17:29 +0200 |
commit | e4036b1ce9fa2f4086b050eb946f169c11efad08 (patch) | |
tree | 25d5a0be4781c845ea666591677d5d2a462da65b /sysdeps/pthread | |
parent | 96e61709b49c3ebe4fa49c235ddafaad1f1dfc84 (diff) | |
download | glibc-e4036b1ce9fa2f4086b050eb946f169c11efad08.tar.gz glibc-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>
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r-- | sysdeps/pthread/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/pthread/tss_create.c | 11 |
2 files changed, 12 insertions, 2 deletions
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 |