glibc/htl
Florian Weimer 706ad1e7af 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>
2020-07-06 11:15:58 +02:00
..
tests Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
alloca_cutoff.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
cancellation.c htl: Add support for libc cancellation points 2020-02-10 01:03:50 +00:00
configure hurd: Add hurd thread library 2018-04-02 01:44:14 +02:00
configure.in hurd: Add hurd thread library 2018-04-02 01:44:14 +02:00
cthreads-compat.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
forward.c htl: Move cleanup stack to variable shared between libc and pthread 2020-06-14 15:53:04 +00:00
herrno.c htl: Add __errno_location and __h_errno_location 2020-01-04 19:37:53 +01:00
libc_pthread_init.c htl: Move cleanup stack to variable shared between libc and pthread 2020-06-14 15:53:04 +00:00
libpthread_pic.a htl: Fix linking static tests by factorizing the symbols list 2020-06-10 21:34:19 +00:00
libpthread_syms.a htl: Fix linking static tests by factorizing the symbols list 2020-06-10 21:34:19 +00:00
libpthread.a htl: Fix linking static tests by factorizing the symbols list 2020-06-10 21:34:19 +00:00
lockfile.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Makefile htl: initialize first and prevent from unloading 2020-06-14 15:53:04 +00:00
pt-alloc.c htl: Move cleanup stack to variable shared between libc and pthread 2020-06-14 15:53:04 +00:00
pt-cancel.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pt-cleanup.c htl: Move cleanup stack to variable shared between libc and pthread 2020-06-14 15:53:04 +00:00
pt-create.c Add the __libc_single_threaded variable 2020-07-06 11:15:58 +02:00
pt-dealloc.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pt-detach.c htl C11 threads: Avoid pthread_ symbols visibility in static library 2020-02-10 23:45:23 +00:00
pt-exit.c htl C11 threads: Avoid pthread_ symbols visibility in static library 2020-02-10 23:45:23 +00:00
pt-getattr.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pt-initialize.c htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy 2020-02-09 13:56:45 +01:00
pt-internal.h htl: Move cleanup stack to variable shared between libc and pthread 2020-06-14 15:53:04 +00:00
pt-join.c htl: Add clock variants 2020-05-26 00:46:07 +00:00
pt-self.c htl C11 threads: Avoid pthread_ symbols visibility in static library 2020-02-10 23:45:23 +00:00
pt-setcancelstate.c htl C11 threads: Avoid pthread_ symbols visibility in static library 2020-02-10 23:45:23 +00:00
pt-setcanceltype.c htl C11 threads: Avoid pthread_ symbols visibility in static library 2020-02-10 23:45:23 +00:00
pt-sigmask.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pt-spin-inlines.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pt-testcancel.c htl: Add support for libc cancellation points 2020-02-10 01:03:50 +00:00
pt-yield.c htl: Avoid exposing unixoid functions 2020-01-13 01:38:33 +01:00
register-atfork.c htl: fix register-atfork ordering 2020-06-07 03:00:22 +02:00
shlib-versions hurd: Add hurd thread library 2018-04-02 01:44:14 +02:00
Versions htl: Move cleanup stack to variable shared between libc and pthread 2020-06-14 15:53:04 +00:00