]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nptl: Eliminate __pthread_multiple_threads
authorFlorian Weimer <fweimer@redhat.com>
Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)
It is no longer needed after the SINGLE_THREADED_P consolidation.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
nptl/allocatestack.c
nptl/pthreadP.h
nptl/pthread_cancel.c
nptl/vars.c

index 059786192e22920a19ecf1ec832470d187768328..88c49f815417bf3580480069b66b33162c3e10f8 100644 (file)
@@ -477,7 +477,7 @@ 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
-      __pthread_multiple_threads = __libc_multiple_threads = 1;
+      __libc_multiple_threads = 1;
 #endif
 
 #ifdef NEED_DL_SYSINFO
@@ -598,7 +598,7 @@ 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
-         __pthread_multiple_threads = __libc_multiple_threads = 1;
+         __libc_multiple_threads = 1;
 #endif
 
 #ifdef NEED_DL_SYSINFO
index dd6d6c6342da875e4f4689013d015559fdf7e346..8ab247f977b88607c72e01c9200fddf72d611d2d 100644 (file)
@@ -370,13 +370,6 @@ extern unsigned long int *__fork_generation_pointer attribute_hidden;
 /* Register the generation counter in the libpthread with the libc.  */
 extern void __libc_pthread_init (void (*reclaim) (void));
 
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
-/* Variable set to a nonzero value either if more than one thread runs or ran,
-   or if a single-threaded process is trying to cancel itself.  See
-   nptl/descr.h for more context on the single-threaded process case.  */
-extern int __pthread_multiple_threads attribute_hidden;
-#endif
-
 extern size_t __pthread_get_minstack (const pthread_attr_t *attr);
 
 /* Namespace save aliases.  */
index 2cab8f0a34d3790b491a551d89e8b753db1d7ffe..fd04bedf6cf3d99d362125b4ec8d5a289de967f6 100644 (file)
@@ -90,7 +90,7 @@ __pthread_cancel (pthread_t th)
           points get executed.  */
        THREAD_SETMEM (THREAD_SELF, header.multiple_threads, 1);
 #ifndef TLS_MULTIPLE_THREADS_IN_TCB
-       __pthread_multiple_threads = __libc_multiple_threads = 1;
+       __libc_multiple_threads = 1;
 #endif
     }
   /* Mark the thread as canceled.  This has to be done
index 8de30856b85de0c41c82e8ecf3898bd8bb37f6ef..03a6cc84be80a5de1e74c43f4a4edbe59d63cd4a 100644 (file)
@@ -26,10 +26,3 @@ union pthread_attr_transparent __default_pthread_attr attribute_hidden;
 
 /* Mutex protecting __default_pthread_attr.  */
 int __default_pthread_attr_lock = LLL_LOCK_INITIALIZER;
-
-#ifndef TLS_MULTIPLE_THREADS_IN_TCB
-/* Variable set to a nonzero value either if more than one thread runs or ran,
-   or if a single-threaded process is trying to cancel itself.  See
-   nptl/descr.h for more context on the single-threaded process case.  */
-int __pthread_multiple_threads attribute_hidden;
-#endif