From e070501d12b47e88c1ff8c313f887976fb578938 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 7 Jun 2022 13:09:40 -0300 Subject: Replace __libc_multiple_threads with __libc_single_threaded And also fixes the SINGLE_THREAD_P macro for SINGLE_THREAD_BY_GLOBAL, since header inclusion single-thread.h is in the wrong order, the define needs to come before including sysdeps/unix/sysdep.h. The macro is now moved to a per-arch single-threade.h header. The SINGLE_THREAD_P is used on some more places. Checked on aarch64-linux-gnu and x86_64-linux-gnu. --- posix/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'posix') diff --git a/posix/fork.c b/posix/fork.c index 987916a175..cee5ae83c8 100644 --- a/posix/fork.c +++ b/posix/fork.c @@ -45,7 +45,7 @@ __libc_fork (void) requirement for fork (Austin Group tracker issue #62) this is best effort to make is async-signal-safe at least for single-thread case. */ - bool multiple_threads = __libc_single_threaded_internal == 0; + bool multiple_threads = !SINGLE_THREAD_P; uint64_t lastrun; lastrun = __run_prefork_handlers (multiple_threads); -- cgit 1.4.1