From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH v3 21/37] Remove pthread_key_create-related internals from libc-lock.h
Date: Tue, 16 Mar 2021 18:30:22 +0100 [thread overview]
Message-ID: <bc60e8d7782199a5738a9acc5472cf04e648e1f4.1615914632.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1615914631.git.fweimer@redhat.com>
And libc-lockP.h. This is no longer used because all internal
TLS use goes directly to the thread descriptor/TCB or uses ELF TLS.
---
sysdeps/generic/libc-lock.h | 12 ------------
sysdeps/htl/libc-lockP.h | 13 -------------
sysdeps/nptl/libc-lockP.h | 24 ------------------------
3 files changed, 49 deletions(-)
diff --git a/sysdeps/generic/libc-lock.h b/sysdeps/generic/libc-lock.h
index 6b1e98e34d..c538e858ea 100644
--- a/sysdeps/generic/libc-lock.h
+++ b/sysdeps/generic/libc-lock.h
@@ -125,16 +125,4 @@
/* We need portable names for some of the functions. */
#define __libc_mutex_unlock
-/* Type for key of thread specific data. */
-typedef int __libc_key_t;
-
-/* Create key for thread specific data. */
-#define __libc_key_create(KEY,DEST) ((void) (KEY), (void) (DEST), -1)
-
-/* Set thread-specific data associated with KEY to VAL. */
-#define __libc_setspecific(KEY,VAL) ((void) (KEY), (void) (VAL))
-
-/* Get thread-specific data associated with KEY. */
-#define __libc_getspecific(KEY) ((void) (KEY), (void *) 0)
-
#endif /* libc-lock.h */
diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h
index f183bde680..eb09171c85 100644
--- a/sysdeps/htl/libc-lockP.h
+++ b/sysdeps/htl/libc-lockP.h
@@ -22,9 +22,6 @@
#include <pthread.h>
#include <pthread-functions.h>
-/* Type for key to thread-specific data. */
-typedef pthread_key_t __libc_key_t;
-
/* If we check for a weakly referenced symbol and then perform a
normal jump to it te code generated for some platforms in case of
PIC is unnecessarily slow. What would happen is that the function
@@ -109,16 +106,6 @@ extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
-extern int __pthread_key_create (pthread_key_t *__key,
- void (*__destr_function) (void *));
-
-extern int __pthread_key_delete (pthread_key_t __key);
-
-extern int __pthread_setspecific (pthread_key_t __key,
- const void *__pointer);
-
-extern void *__pthread_getspecific (pthread_key_t __key);
-
extern int __pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void));
diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h
index df62ce0e61..d032463dd0 100644
--- a/sysdeps/nptl/libc-lockP.h
+++ b/sysdeps/nptl/libc-lockP.h
@@ -49,9 +49,6 @@ typedef int __libc_lock_t;
typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
typedef pthread_rwlock_t __libc_rwlock_t;
-/* Type for key to thread-specific data. */
-typedef pthread_key_t __libc_key_t;
-
/* Define a lock variable NAME with storage class CLASS. The lock must be
initialized with __libc_lock_init before it can be used (or define it
with __libc_lock_define_initialized, below). Use `extern' for CLASS to
@@ -267,19 +264,6 @@ __libc_cleanup_routine (struct __pthread_cleanup_frame *f)
} while (0)
#endif /* __EXCEPTIONS */
-/* Create thread-specific key. */
-#define __libc_key_create(KEY, DESTRUCTOR) \
- __libc_ptf_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)
-
-/* Get thread-specific data. */
-#define __libc_getspecific(KEY) \
- __libc_ptf_call (__pthread_getspecific, (KEY), NULL)
-
-/* Set thread-specific data. */
-#define __libc_setspecific(KEY, VALUE) \
- __libc_ptf_call (__pthread_setspecific, (KEY, VALUE), 0)
-
-
/* Register handlers to execute before and after `fork'. Note that the
last parameter is NULL. The handlers registered by the libc are
never removed so this is OK. */
@@ -324,14 +308,6 @@ extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
-extern int __pthread_key_create (pthread_key_t *__key,
- void (*__destr_function) (void *));
-
-extern int __pthread_setspecific (pthread_key_t __key,
- const void *__pointer);
-
-extern void *__pthread_getspecific (pthread_key_t __key);
-
extern int __pthread_once (pthread_once_t *__once_control,
void (*__init_routine) (void));
libc_hidden_proto (__pthread_once)
--
2.29.2
next prev parent reply other threads:[~2021-03-16 17:30 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 17:27 [PATCH v3 00/37] libpthread removal: NPTL forwarders are gone Florian Weimer
2021-03-16 17:27 ` [PATCH v3 01/37] nptl: Move pthread_mutex_consistent into libc Florian Weimer
2021-03-17 11:36 ` Adhemerval Zanella
2021-03-16 17:27 ` [PATCH v3 02/37] nptl: Move __pthread_cleanup_routine " Florian Weimer
2021-03-16 17:27 ` [PATCH v3 03/37] nptl: Move legacy unwinding implementation " Florian Weimer
2021-03-16 17:27 ` [PATCH v3 04/37] nptl: Move legacy cancelation handling into libc as compat symbols Florian Weimer
2021-03-16 17:27 ` [PATCH v3 05/37] nptl: Remove longjmp, siglongjmp from libpthread Florian Weimer
2021-03-17 11:38 ` Adhemerval Zanella
2021-03-16 17:28 ` [PATCH v3 06/37] x86: Restore compile-time check for shadow stack pointer in longjmp Florian Weimer
2021-03-16 17:28 ` [PATCH v3 07/37] nptl: Move __pthread_cleanup_upto into libc Florian Weimer
2021-03-16 17:28 ` [PATCH v3 08/37] nptl: Move pthread_once and __pthread_once " Florian Weimer
2021-03-17 13:30 ` Adhemerval Zanella
2021-03-17 13:37 ` Adhemerval Zanella
2021-03-17 14:45 ` Florian Weimer
2021-03-17 16:39 ` Adhemerval Zanella
2021-03-17 16:56 ` Florian Weimer
2021-03-17 17:22 ` Adhemerval Zanella
2021-03-17 17:43 ` Florian Weimer
2021-03-17 19:09 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 09/37] nptl: Move __pthread_unwind_next " Florian Weimer
2021-03-17 19:42 ` Adhemerval Zanella
2021-03-17 19:54 ` Florian Weimer
2021-03-17 20:16 ` Adhemerval Zanella
2021-03-17 20:33 ` Florian Weimer
2021-03-17 20:44 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 10/37] csu: Move calling main out of __libc_start_main_impl Florian Weimer
2021-03-17 20:45 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 11/37] nptl: Move internal __nptl_nthreads variable into libc Florian Weimer
2021-03-18 12:42 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 12/37] nptl_db: Introduce DB_MAIN_ARRAY_VARIABLE Florian Weimer
2021-03-18 12:43 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 13/37] nptl: Move __pthread_keys global variable into libc Florian Weimer
2021-03-18 12:44 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 14/37] nptl: Move __nptl_deallocate_tsd " Florian Weimer
2021-03-18 12:46 ` Adhemerval Zanella
2021-03-18 17:16 ` Florian Weimer
2021-03-18 17:54 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 15/37] nptl: Move pthread_exit " Florian Weimer
2021-03-18 12:49 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 16/37] nptl: Move pthread_setcancelstate " Florian Weimer
2021-03-18 12:52 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 17/37] nptl: Move pthread_setcanceltype " Florian Weimer
2021-03-18 12:53 ` Adhemerval Zanella
2021-03-16 17:29 ` [PATCH v3 18/37] nptl: Invoke the set_robust_list system call directly in fork Florian Weimer
2021-03-18 12:54 ` Adhemerval Zanella
2021-03-16 17:30 ` [PATCH v3 19/37] dlfcn: Failures after dlmopen should not terminate process [BZ #24772] Florian Weimer
2021-03-19 19:56 ` Adhemerval Zanella
2021-03-27 16:57 ` Florian Weimer
2021-03-16 17:30 ` [PATCH v3 20/37] dlfcn: dlerror needs to call free from the base namespace [BZ #24773] Florian Weimer
2021-03-23 14:47 ` Adhemerval Zanella
2021-03-16 17:30 ` Florian Weimer [this message]
2021-03-23 16:39 ` [PATCH v3 21/37] Remove pthread_key_create-related internals from libc-lock.h Adhemerval Zanella
2021-03-16 17:30 ` [PATCH v3 22/37] elf: Introduce __tls_init_tp for second-phase TCB initialization Florian Weimer
2021-03-23 18:25 ` Adhemerval Zanella
2021-03-16 17:30 ` [PATCH v3 23/37] nptl: Move part of TCB initialization from libpthread to __tls_init_tp Florian Weimer
2021-03-24 13:56 ` Adhemerval Zanella
2021-03-27 17:19 ` Florian Weimer
2021-03-16 17:30 ` [PATCH v3 24/37] nptl: Move pthread_key_create, __pthread_key_create into libc Florian Weimer
2021-03-24 14:09 ` Adhemerval Zanella
2021-03-24 14:32 ` Florian Weimer
2021-03-24 14:42 ` Adhemerval Zanella
2021-03-24 15:08 ` Florian Weimer
2021-03-24 15:46 ` Adhemerval Zanella
2021-03-16 17:30 ` [PATCH v3 25/37] nptl: Move pthread_getspecific, __pthread_getspecific " Florian Weimer
2021-03-24 14:12 ` Adhemerval Zanella
2021-03-24 14:38 ` Florian Weimer
2021-03-24 14:43 ` Adhemerval Zanella
2021-03-16 17:30 ` [PATCH v3 26/37] nptl: Move pthread_setspecific, __pthread_setspecific " Florian Weimer
2021-03-24 14:26 ` Adhemerval Zanella
2021-03-16 17:30 ` [PATCH v3 27/37] nptl: Move pthread_key_delete " Florian Weimer
2021-03-24 14:45 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 28/37] nptl: Move rwlock functions with forwarders " Florian Weimer
2021-03-25 19:52 ` Adhemerval Zanella
2021-03-27 21:41 ` Florian Weimer
2021-03-16 17:31 ` [PATCH v3 29/37] nptl: Move the internal thread priority protection symbols " Florian Weimer
2021-03-25 20:21 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 30/37] pthread: Introduce __pthread_early_init Florian Weimer
2021-03-25 20:22 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 31/37] nptl: Move internal symbol __mutex_aconf into libc Florian Weimer
2021-03-25 20:24 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 32/37] nptl: pthread_mutex_lock, pthread_mutex_unock single-threaded optimization Florian Weimer
2021-03-26 18:00 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 33/37] x86: Remove low-level lock optimization Florian Weimer
2021-03-25 20:30 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 34/37] nptl: Move core mutex functions into libc Florian Weimer
2021-03-25 20:46 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 35/37] nptl: Move core condition variable " Florian Weimer
2021-03-26 17:14 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 36/37] nptl: Move setxid broadcast implementation " Florian Weimer
2021-03-26 18:15 ` Adhemerval Zanella
2021-04-06 18:41 ` Florian Weimer
2021-04-06 18:54 ` Adhemerval Zanella
2021-04-06 19:23 ` Florian Weimer
2021-04-06 19:40 ` Adhemerval Zanella
2021-03-16 17:31 ` [PATCH v3 37/37] nptl: Remove remnants of the libc/libpthread forwarder interface Florian Weimer
2021-03-26 18:19 ` Adhemerval Zanella
2021-03-18 22:06 ` [PATCH v3 00/37] libpthread removal: NPTL forwarders are gone Florian Weimer
2021-03-26 18:25 ` Adhemerval Zanella
2021-03-31 10:18 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc60e8d7782199a5738a9acc5472cf04e648e1f4.1615914632.git.fweimer@redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).