aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-10 10:31:41 +0200
commit321789f61aa93c14390535aa3cf01846633cd022 (patch)
treefe2687c3058b23379918e700a7bfec82da2f4cd0 /sysdeps/unix
parentd6163dfd3831cf48b69f430f37b4c099059a9db5 (diff)
downloadglibc-321789f61aa93c14390535aa3cf01846633cd022.zip
glibc-321789f61aa93c14390535aa3cf01846633cd022.tar.gz
glibc-321789f61aa93c14390535aa3cf01846633cd022.tar.bz2
nptl: Export __libc_multiple_threads from libc as an internal symbol
This allows the elimination of the __libc_multiple_threads_ptr variable in libpthread and its initialization procedure. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/single-thread.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/single-thread.h b/sysdeps/unix/sysv/linux/single-thread.h
index a28aaed..841f8c6 100644
--- a/sysdeps/unix/sysv/linux/single-thread.h
+++ b/sysdeps/unix/sysv/linux/single-thread.h
@@ -27,9 +27,13 @@
The ABI might define SINGLE_THREAD_BY_GLOBAL to enable the single thread
check to use global variables instead of the pthread_t field. */
+#ifndef __ASSEMBLER__
+extern int __libc_multiple_threads;
+libc_hidden_proto (__libc_multiple_threads)
+#endif
+
#ifdef SINGLE_THREAD_BY_GLOBAL
# if IS_IN (libc)
-extern int __libc_multiple_threads;
# define SINGLE_THREAD_P \
__glibc_likely (__libc_multiple_threads == 0)
# elif IS_IN (libpthread)