From 321789f61aa93c14390535aa3cf01846633cd022 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 10 May 2021 10:31:41 +0200 Subject: 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 Reviewed-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/single-thread.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/single-thread.h b/sysdeps/unix/sysv/linux/single-thread.h index a28aaed04d..841f8c69d5 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) -- cgit v1.2.3