]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Remove THREAD_GSCOPE_IN_TCB
authorSergey Bugaev <bugaevc@gmail.com>
Wed, 15 Sep 2021 17:11:10 +0000 (20:11 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 15 Sep 2021 23:04:20 +0000 (01:04 +0200)
All the ports now have THREAD_GSCOPE_IN_TCB set to 1. Remove all
support for !THREAD_GSCOPE_IN_TCB, along with the definition itself.

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20210915171110.226187-4-bugaevc@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
22 files changed:
elf/dl-support.c
sysdeps/aarch64/nptl/tls.h
sysdeps/alpha/nptl/tls.h
sysdeps/arc/nptl/tls.h
sysdeps/arm/nptl/tls.h
sysdeps/csky/nptl/tls.h
sysdeps/generic/ldsodefs.h
sysdeps/generic/tls.h
sysdeps/hppa/nptl/tls.h
sysdeps/i386/nptl/tls.h
sysdeps/ia64/nptl/tls.h
sysdeps/m68k/nptl/tls.h
sysdeps/mach/hurd/i386/tls.h
sysdeps/microblaze/nptl/tls.h
sysdeps/mips/nptl/tls.h
sysdeps/nios2/nptl/tls.h
sysdeps/powerpc/nptl/tls.h
sysdeps/riscv/nptl/tls.h
sysdeps/s390/nptl/tls.h
sysdeps/sh/nptl/tls.h
sysdeps/sparc/nptl/tls.h
sysdeps/x86_64/nptl/tls.h

index a317459fae39bbacb569e6679ec0d7bf51f87f20..02e2ed72f5853ef1b05a7488705e255ee5f5d9b7 100644 (file)
@@ -197,9 +197,6 @@ int _dl_stack_cache_lock;
 int (*_dl_make_stack_executable_hook) (void **) = _dl_make_stack_executable;
 void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls;
 #endif
-#if !THREAD_GSCOPE_IN_TCB
-int _dl_thread_gscope_count;
-#endif
 struct dl_scope_free_list *_dl_scope_free_list;
 
 #ifdef NEED_DL_SYSINFO
index 6e896207a659514f09e3a1fa657eeea50ece4810..72f22dc7182e1e028b7b5ecdb1ac6a0c4d61cb5f 100644 (file)
@@ -109,7 +109,6 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
-# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
index 4dbccc5249539325a709282d4c3c18bcd3833450..6328112135c160dd3c5dfbf9661cd8a57a342235 100644 (file)
@@ -103,7 +103,6 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 95300fdd2159dc530725bd62393140d3ba2e1f92..e269c0a7a59e20b703fabd83028a99f4a47e960d 100644 (file)
@@ -111,7 +111,6 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 1bd11307ce0a7f0a84e535eb1cbff270ee079f4e..699c16acfbc8db97c4032b3db437f8e7c8462c6b 100644 (file)
@@ -100,7 +100,6 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 7a234041ed0bff393019af9cc9b3bd537bba79f0..b210dfcb762f2767531f8094d5ca1d35e5d0ac44 100644 (file)
@@ -127,7 +127,6 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
-# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
index f01b601d636c01c6601fd15d3f4e175fcc6e94fc..fd67871f4b67427befacfde08d43a25e5c74df78 100644 (file)
@@ -495,10 +495,6 @@ struct rtld_global
   EXTERN struct __pthread **_dl_pthread_threads;
   __libc_rwlock_define (EXTERN, _dl_pthread_threads_lock)
 #endif
-
-#if !THREAD_GSCOPE_IN_TCB
-  EXTERN int _dl_thread_gscope_count;
-#endif
 #ifdef SHARED
 };
 # define __rtld_global_attribute__
@@ -1381,10 +1377,8 @@ __rtld_mutex_init (void)
 }
 #endif /* !PTHREAD_IN_LIBC */
 
-#if THREAD_GSCOPE_IN_TCB
 void __thread_gscope_wait (void) attribute_hidden;
 # define THREAD_GSCOPE_WAIT() __thread_gscope_wait ()
-#endif
 
 __END_DECLS
 
index e86d70e6cebba5c88c27bae789b8b1a0fedb256f..f581c9a99202791a3ffb6e9bfbd22021153e7092 100644 (file)
      This macro returns the address of the DTV of the current thread.
      This normally is done using the thread register which points
      to the dtv or the TCB (from which the DTV can found).
-
-
-     THREAD_GSCOPE_IN_TCB
-
-     This should be set to 1 if the global scope flag is stored within the TCB.
-     When set to 0, GL(_dl_thread_gscope_count) will be defined to store it.
   */
index 857003a7d35073eb50a318e08ef7da802b49b360..55559eb3274655b4d1676040ea0bb5ad5f5cf7c2 100644 (file)
@@ -134,7 +134,6 @@ static inline void __set_cr27(struct pthread *cr27)
 }
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 86ee1ef30270f960b0db04446797225cd4849b54..cfb27f5ccd4be3ea970b4e931a4542b245151fb3 100644 (file)
@@ -375,7 +375,6 @@ tls_fill_user_desc (union user_desc_init *desc,
 
 
 /* Get and set the global scope generation counter in the TCB head.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 66d9bf3189f0b727486f47c0c4ed66973240ac4e..8c267288597d88680b1cfe35b702b92c778d6447 100644 (file)
@@ -155,7 +155,6 @@ register struct pthread *__thread_self __asm__("r13");
    = THREAD_GET_POINTER_GUARD ())
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index dd526cdc2eec6a6353129c9878effc85866dbc6a..34906b1c135433c67baa8c015c291b20265e964a 100644 (file)
@@ -132,7 +132,6 @@ extern void * __m68k_read_tp (void);
 # define NO_TLS_OFFSET         -1
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 2ac65df921bc89cdd4222ae1e98907ea69f284d9..c70ea73a810053fdfcbb73d0ff0d91586cca9598 100644 (file)
@@ -370,8 +370,6 @@ _hurd_tls_new (thread_t child, struct i386_thread_state *state, tcbhead_t *tcb)
 }
 
 /* Global scope switch support.  */
-# define THREAD_GSCOPE_IN_TCB      1
-
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
index c93d90b11bfe4c74ee615ceaff1694a26452d87c..0ca67a777d0f2a7beb20e8009ae3a07983e2a568 100644 (file)
@@ -116,7 +116,6 @@ typedef struct
   (descr->member[idx] = (value))
 
 /* Get and set the global scope generation counter in struct pthread.  */
-# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
index c09f49071cf3b5b91a70792beb07b875f97abc52..04e823b4c78147d7f5a7562d610e0280f3b48851 100644 (file)
@@ -158,7 +158,6 @@ typedef struct
 # define NO_TLS_OFFSET         -1
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 02a05b4e741092bf774cbc9f951fa7eff7572702..fd484135f474bd2e9e3b073aae9a72345a842d70 100644 (file)
@@ -137,7 +137,6 @@ register struct pthread *__thread_self __asm__("r23");
 # define NO_TLS_OFFSET         -1
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 6c779b6609147d54fb0c04e17d5587e358c84e97..cc93c44964a083f49dd8bb1bf9c2aa836c183cd9 100644 (file)
@@ -231,7 +231,6 @@ typedef struct
 # define NO_TLS_OFFSET         -1
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index 5350bcc0498bab6946dbd2ea4154ee37f48b31c0..e4bd736feb5bddccb680a0b824f833f08a46d00a 100644 (file)
@@ -119,7 +119,6 @@ typedef struct
 # define NO_TLS_OFFSET         -1
 
 /* Get and set the global scope generation counter in struct pthread.  */
-# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
index efb52515e05c06a9afe57f23b42ebd8c4e78174a..804486dfdddc101dbb041888f2f967237d2a9aeb 100644 (file)
@@ -165,7 +165,6 @@ typedef struct
 #define THREAD_COPY_POINTER_GUARD(descr)
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index ac3c9a9e856ee686a885a984ca3c1aad52df55c4..2a9ee1def145251d5d18ed2657d2a45d89cb7ad3 100644 (file)
@@ -141,7 +141,6 @@ typedef struct
      ((tcbhead_t *) (descr + 1))->pointer_guard        = __tcbp->pointer_guard;})
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index dd1eb82a595619a98c30c330a7a616ec958801ea..55955f376a2889d414e05534479230f36eeb2f65 100644 (file)
@@ -138,7 +138,6 @@ register struct pthread *__thread_self __asm__("%g7");
   ((descr)->header.pointer_guard = THREAD_GET_POINTER_GUARD ())
 
 /* Get and set the global scope generation counter in struct pthread.  */
-#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
index a78c4f4d016002fa31f0172d82f5032d4b6048bb..b0d044353b7a03e5537dd266e265f232e213a47c 100644 (file)
@@ -326,7 +326,6 @@ _Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80,
 
 
 /* Get and set the global scope generation counter in the TCB head.  */
-# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2