aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/x86_64
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-05-20 15:40:35 +0200
committerFlorian Weimer <fweimer@redhat.com>2020-07-06 11:15:58 +0200
commit706ad1e7af37be1d25fc2359bda006d31fe0d11b (patch)
treed06e6a96c1d319a1d27fa6b6e87cfadf8bd6ef08 /sysdeps/unix/sysv/linux/x86_64
parent8f4632deb3545b2949cec5454afc3cb21a0024ea (diff)
downloadglibc-706ad1e7af37be1d25fc2359bda006d31fe0d11b.tar
glibc-706ad1e7af37be1d25fc2359bda006d31fe0d11b.tar.gz
glibc-706ad1e7af37be1d25fc2359bda006d31fe0d11b.tar.bz2
glibc-706ad1e7af37be1d25fc2359bda006d31fe0d11b.zip
Add the __libc_single_threaded variable
The variable is placed in libc.so, and it can be true only in an outer libc, not libcs loaded via dlmopen or static dlopen. Since thread creation from inner namespaces does not work, pthread_create can update __libc_single_threaded directly. Using __libc_early_init and its initial flag, implementation of this variable is very straightforward. A future version may reset the flag during fork (but not in an inner namespace), or after joining all threads except one. Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist1
2 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 168ca03aa2..90f3c1d2f0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2065,6 +2065,7 @@ GLIBC_2.30 getdents64 F
GLIBC_2.30 gettid F
GLIBC_2.30 tgkill F
GLIBC_2.30 twalk_r F
+GLIBC_2.32 __libc_single_threaded D 0x1
GLIBC_2.32 __rseq_abi T 0x20
GLIBC_2.32 pthread_attr_getsigmask_np F
GLIBC_2.32 pthread_attr_setaffinity_np F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 82a5089792..8dbe6d3ed2 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2162,6 +2162,7 @@ GLIBC_2.30 getdents64 F
GLIBC_2.30 gettid F
GLIBC_2.30 tgkill F
GLIBC_2.30 twalk_r F
+GLIBC_2.32 __libc_single_threaded D 0x1
GLIBC_2.32 __rseq_abi T 0x20
GLIBC_2.32 pthread_attr_getsigmask_np F
GLIBC_2.32 pthread_attr_setaffinity_np F