glibc/sysdeps/nptl
Florian Weimer aaacde11f2 Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN
<limits.h> used to be a header file with no declarations.
GCC's libgomp includes it in a #pragma GCC visibility hidden block.
Including <unistd.h> from <limits.h> (indirectly) declares everything
in <unistd.h> with hidden visibility, resulting in linker failures.

This commit avoids C declarations in assembler mode and only declares
__sysconf in <limits.h> (and not the entire contents of <unistd.h>).
The __sysconf symbol is already part of the ABI.  PTHREAD_STACK_MIN
is no longer defined for __USE_DYNAMIC_STACK_SIZE && __ASSEMBLER__
because there is no possible definition.

Additionally, PTHREAD_STACK_MIN is now defined by <pthread.h> for
__USE_MISC because this is what developers expect based on the macro
name.  It also helps to avoid libgomp linker failures in GCC because
libgomp includes <pthread.h> before its visibility hacks.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-07-12 18:43:32 +02:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sys Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
_Fork.c posix: Consolidate fork implementation 2021-06-24 10:02:06 -03:00
aio_misc.h Linux: Move aio_init from librt into libc 2021-06-25 11:48:25 +02:00
dl-mutex.c elf, nptl: Resolve recursive lock implementation early 2021-05-10 10:31:41 +02:00
dl-thread_gscope_wait.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tls_init_tp.c Force building with -fno-common 2021-07-09 20:09:14 +02:00
dl-tunables.list nptl: Add glibc.pthread.stack_cache_size tunable 2021-06-28 16:41:58 +02:00
fork.h Linux: Move timer helper routines from librt to libc 2021-06-25 12:21:12 +02:00
futex-internal.h linux: Only use 64-bit syscall if required for internal futex 2021-06-22 12:09:52 -03:00
gai_misc.h resolv: Move libanl into libc (if libpthread is in libc) 2021-07-02 11:45:00 +02:00
Implies
internaltypes.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmp-unwind.c nptl: Move pthreadP.h into sysdeps directory 2021-06-22 09:51:10 +02:00
libc_start_call_main.h nptl: Move pthreadP.h into sysdeps directory 2021-06-22 09:51:10 +02:00
libc-lock.h nptl: Move legacy unwinding implementation into libc 2021-04-21 19:49:50 +02:00
libc-lockP.h nptl: Use internal low-level lock type for !IS_IN (libc) 2021-07-07 08:41:14 +02:00
lowlevellock-futex.h nptl: Consolidate async cancel enable/disable implementation in libc 2021-05-05 17:19:32 +02:00
lowlevellock.h nptl: Use out-of-line wake function in __libc_lock_unlock slow path 2021-07-09 10:59:22 +02:00
Makeconfig Linux: Cleanups after librt move 2021-06-28 09:51:01 +02:00
Makefile Linux: Move timer helper routines from librt to libc 2021-06-25 12:21:12 +02:00
malloc-machine.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
proc_service.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pthread_atfork_compat.h Consolidate pthread_atfork 2021-06-24 10:04:41 -03:00
pthread_early_init.h nptl: Move pthreadP.h into sysdeps directory 2021-06-22 09:51:10 +02:00
pthread_mutex_conf.h nptl: Move internal symbol __mutex_aconf into libc 2021-04-21 19:49:51 +02:00
pthread-offsets.h nptl: update default pthread-offsets.h 2020-02-10 17:01:21 +01:00
pthread.h Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
pthreadP.h Linux: Move aio_init from librt into libc 2021-06-25 11:48:25 +02:00
setxid.h nptl: Move pthreadP.h into sysdeps directory 2021-06-22 09:51:10 +02:00
stdio-lock.h libio: Assume _IO_lock_inexpensive 2021-06-04 09:54:52 -03:00
Subdirs
tcb-offsets.h
thread_db.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
timer_routines.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-mqueue8x.c