1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

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>
This commit is contained in:
Florian Weimer
2021-05-03 08:12:12 +02:00
parent 96e61709b4
commit e4036b1ce9
65 changed files with 79 additions and 32 deletions

View File

@@ -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