diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 6 | ||||
-rw-r--r-- | nptl/nptl-init.c | 1 | ||||
-rw-r--r-- | nptl/pthreadP.h | 1 | ||||
-rw-r--r-- | nptl/pthread_key_create.c | 20 |
5 files changed, 20 insertions, 10 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 4b3e319912..ed417970af 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -78,6 +78,7 @@ routines = \ pthread_getaffinity \ pthread_getattr_np \ pthread_getschedparam \ + pthread_key_create \ pthread_keys \ pthread_kill \ pthread_mutex_consistent \ @@ -144,7 +145,6 @@ libpthread-routines = \ pthread_getspecific \ pthread_join \ pthread_join_common \ - pthread_key_create \ pthread_key_delete \ pthread_kill_other_threads \ pthread_mutex_cond_lock \ diff --git a/nptl/Versions b/nptl/Versions index 2153670c7d..5df4759c1c 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -1,5 +1,6 @@ libc { GLIBC_2.0 { + __pthread_key_create; __pthread_once; _pthread_cleanup_pop; _pthread_cleanup_pop_restore; @@ -28,6 +29,7 @@ libc { pthread_equal; pthread_exit; pthread_getschedparam; + pthread_key_create; pthread_kill; pthread_mutex_destroy; pthread_mutex_init; @@ -87,7 +89,9 @@ libc { } GLIBC_2.34 { __pthread_cleanup_routine; + __pthread_key_create; __pthread_once; + pthread_key_create; pthread_kill; pthread_mutex_consistent; pthread_once; @@ -137,7 +141,6 @@ libpthread { __h_errno_location; __pthread_atfork; __pthread_getspecific; - __pthread_key_create; __pthread_mutex_destroy; __pthread_mutex_init; __pthread_mutex_lock; @@ -161,7 +164,6 @@ libpthread { pthread_detach; pthread_getspecific; pthread_join; - pthread_key_create; pthread_key_delete; pthread_kill_other_threads_np; pthread_mutex_destroy; diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 8d3a9de44d..c2cb8acdaa 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -69,7 +69,6 @@ static const struct pthread_functions pthread_functions = .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock, .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock, .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock, - .ptr___pthread_key_create = __pthread_key_create, .ptr___pthread_getspecific = __pthread_getspecific, .ptr___pthread_setspecific = __pthread_setspecific, .ptr__nptl_setxid = __nptl_setxid, diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index b61fda8942..32b1c102a6 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -559,7 +559,6 @@ hidden_proto (__pthread_mutex_unlock) hidden_proto (__pthread_rwlock_rdlock) hidden_proto (__pthread_rwlock_wrlock) hidden_proto (__pthread_rwlock_unlock) -hidden_proto (__pthread_key_create) hidden_proto (__pthread_getspecific) hidden_proto (__pthread_setspecific) hidden_proto (__pthread_testcancel) diff --git a/nptl/pthread_key_create.c b/nptl/pthread_key_create.c index 5b725c56e2..46c5d7b7ff 100644 --- a/nptl/pthread_key_create.c +++ b/nptl/pthread_key_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2021 Free Software Foundation, Inc. + /* Copyright (C) 2002-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -19,10 +19,10 @@ #include <errno.h> #include "pthreadP.h" #include <atomic.h> - +#include <shlib-compat.h> int -__pthread_key_create (pthread_key_t *key, void (*destr) (void *)) +___pthread_key_create (pthread_key_t *key, void (*destr) (void *)) { /* Find a slot in __pthread_keys which is unused. */ for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt) @@ -47,5 +47,15 @@ __pthread_key_create (pthread_key_t *key, void (*destr) (void *)) return EAGAIN; } -weak_alias (__pthread_key_create, pthread_key_create) -hidden_def (__pthread_key_create) +versioned_symbol (libc, ___pthread_key_create, __pthread_key_create, + GLIBC_2_34); +libc_hidden_ver (___pthread_key_create, __pthread_key_create) + +versioned_symbol (libc, ___pthread_key_create, pthread_key_create, + GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_key_create, __pthread_key_create, + GLIBC_2_0); +compat_symbol (libpthread, ___pthread_key_create, pthread_key_create, + GLIBC_2_0); +#endif |