diff options
| author | Florian Weimer <fweimer@redhat.com> | 2025-05-16 19:53:09 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2025-05-16 19:53:09 +0200 |
| commit | 10a66a8e421b09682b774c795ef1da402235dddc (patch) | |
| tree | ab533cd7616e52914c29ab9a9ce03aab1e891ff4 /include | |
| parent | 579f8668816b35f8302e89e5255aff60b81938df (diff) | |
Remove <libc-tsd.h>
Use __thread variables directly instead. The macros do not save any
typing. It seems unlikely that a future port will lack __thread
variable support.
Some of the __libc_tsd_* variables are referenced from assembler
files, so keep their names. Previously, <libc-tls.h> included
<tls.h>, which in turn included <errno.h>, so a few direct includes
of <errno.h> are now required.
Reviewed-by: Frédéric Bérat <fberat@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/ctype.h | 13 | ||||
| -rw-r--r-- | include/rpc/rpc.h | 4 |
2 files changed, 7 insertions, 10 deletions
diff --git a/include/ctype.h b/include/ctype.h index 493a6f80ce..e993adc86d 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -24,33 +24,32 @@ libc_hidden_proto (toupper) NL_CURRENT_INDIRECT. */ # include "../locale/localeinfo.h" -# include <libc-tsd.h> # ifndef CTYPE_EXTERN_INLINE /* Used by ctype/ctype-info.c, which see. */ # define CTYPE_EXTERN_INLINE extern inline # endif -__libc_tsd_define (extern, const uint16_t *, CTYPE_B) -__libc_tsd_define (extern, const int32_t *, CTYPE_TOUPPER) -__libc_tsd_define (extern, const int32_t *, CTYPE_TOLOWER) +extern __thread const uint16_t * __libc_tsd_CTYPE_B; +extern __thread const int32_t * __libc_tsd_CTYPE_TOUPPER; +extern __thread const int32_t * __libc_tsd_CTYPE_TOLOWER; CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const)) __ctype_b_loc (void) { - return __libc_tsd_address (const uint16_t *, CTYPE_B); + return &__libc_tsd_CTYPE_B; } CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const)) __ctype_toupper_loc (void) { - return __libc_tsd_address (const int32_t *, CTYPE_TOUPPER); + return &__libc_tsd_CTYPE_TOUPPER; } CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const)) __ctype_tolower_loc (void) { - return __libc_tsd_address (const int32_t *, CTYPE_TOLOWER); + return &__libc_tsd_CTYPE_TOLOWER; } # ifndef __NO_CTYPE diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h index f5cee6caef..936ea3cebb 100644 --- a/include/rpc/rpc.h +++ b/include/rpc/rpc.h @@ -3,8 +3,6 @@ # ifndef _ISOMAC -#include <libc-tsd.h> - /* Now define the internal interfaces. */ extern unsigned long _create_xid (void); @@ -47,7 +45,7 @@ extern void __rpc_thread_key_cleanup (void) attribute_hidden; extern void __rpc_thread_destroy (void) attribute_hidden; -__libc_tsd_define (extern, struct rpc_thread_variables *, RPC_VARS) +extern __thread struct rpc_thread_variables *__libc_tsd_RPC_VARS; #define RPC_THREAD_VARIABLE(x) (__rpc_thread_variables()->x) |
