diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-10 10:31:41 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-10 10:31:41 +0200 |
commit | 321789f61aa93c14390535aa3cf01846633cd022 (patch) | |
tree | fe2687c3058b23379918e700a7bfec82da2f4cd0 /sysdeps/unix/sysv/linux | |
parent | d6163dfd3831cf48b69f430f37b4c099059a9db5 (diff) | |
download | glibc-321789f61aa93c14390535aa3cf01846633cd022.tar.gz glibc-321789f61aa93c14390535aa3cf01846633cd022.tar.xz glibc-321789f61aa93c14390535aa3cf01846633cd022.zip |
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/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/single-thread.h | 6 |
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 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) |