From 706ad1e7af37be1d25fc2359bda006d31fe0d11b Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 20 May 2020 15:40:35 +0200 Subject: 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 --- sysdeps/generic/libc.abilist | 1 + 1 file changed, 1 insertion(+) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/libc.abilist b/sysdeps/generic/libc.abilist index e69de29bb2..8ca9b93c2f 100644 --- a/sysdeps/generic/libc.abilist +++ b/sysdeps/generic/libc.abilist @@ -0,0 +1 @@ +GLIBC_2.32 __libc_single_threaded D 0x1 -- cgit 1.4.1