about summary refs log tree commit diff
path: root/nptl/allocatestack.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-06-07 13:09:40 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-07-05 10:14:47 -0300
commite070501d12b47e88c1ff8c313f887976fb578938 (patch)
tree8ee321cfb78050dde3c6e84e9a9da9b6eeaf0963 /nptl/allocatestack.c
parentaf1aa36c617d72e80ff6b268bf927b6642d90823 (diff)
downloadglibc-e070501d12b47e88c1ff8c313f887976fb578938.tar.gz
glibc-e070501d12b47e88c1ff8c313f887976fb578938.tar.xz
glibc-e070501d12b47e88c1ff8c313f887976fb578938.zip
Replace __libc_multiple_threads with __libc_single_threaded
And also fixes the SINGLE_THREAD_P macro for SINGLE_THREAD_BY_GLOBAL,
since header inclusion single-thread.h is in the wrong order, the define
needs to come before including sysdeps/unix/sysdep.h.  The macro
is now moved to a per-arch single-threade.h header.

The SINGLE_THREAD_P is used on some more places.

Checked on aarch64-linux-gnu and x86_64-linux-gnu.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r--nptl/allocatestack.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 01a282f3f6..98f5f6dd85 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -292,9 +292,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 
       /* This is at least the second thread.  */
       pd->header.multiple_threads = 1;
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
-      __libc_multiple_threads = 1;
-#endif
 
 #ifdef NEED_DL_SYSINFO
       SETUP_THREAD_SYSINFO (pd);
@@ -413,9 +410,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
 
 	  /* This is at least the second thread.  */
 	  pd->header.multiple_threads = 1;
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
-	  __libc_multiple_threads = 1;
-#endif
 
 #ifdef NEED_DL_SYSINFO
 	  SETUP_THREAD_SYSINFO (pd);