Linux: Simplify and fix the definition of SINGLE_THREAD_P
authorFlorian Weimer <fweimer@redhat.com>
Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)
commit29d4d1be681fee2fa7cf23205b6d993a3b2a4566
tree323727f2eaec15bc660f8e17f4d7fe3413812d27
parent1c75f89613a0b2428c21c19598559a2d64221cde
Linux: Simplify and fix the definition of SINGLE_THREAD_P

Always use __libc_multiple_threads if beneficial, and do not assume
the the dynamic loader is single-threaded.  This assumption could
become incorrect by accident once more code is moved from libpthread
into it.  The previous commit introducing the
NO_SYSCALL_CANCEL_CHECKING macro enables this change.

Do not hint to the compiler that multi-threaded programs are unlikely
(which is not quite true anymore).

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/unix/sysv/linux/single-thread.h