diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-03-27 20:01:11 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-03-27 20:21:25 +0300 |
commit | b3fa1641bfb784931d39f88181067771fc553674 (patch) | |
tree | be5d687ed5c37537e5ad6398d5e85e1dc5b1df38 /pthread_stop_world.c | |
parent | 1ae3d0fbb248509fad6e576c8eb90b81e382ed40 (diff) | |
download | bdwgc-b3fa1641bfb784931d39f88181067771fc553674.tar.gz |
Define and use SIGNAL_BASED_STOP_WORLD macro internally
(refactoring)
* include/private/gc_priv.h [!SIG_SUSPEND]: Check
SIGNAL_BASED_STOP_WORLD macro instead of GC_PTHREADS, GC_WIN32_THREADS,
NACL, GC_DARWIN_THREADS, GC_OPENBSD_UTHREADS, SN_TARGET_PSP2.
* include/private/gcconfig.h [E2K || HP_PA || IA64 || M68K
|| NO_SA_SIGACTION] (SUSPEND_HANDLER_NO_CONTEXT): Likewise.
* include/private/pthread_stop_world.h
(thread_stop_info.last_stop_count): Likewise.
* include/private/pthread_stop_world.h [GC_ENABLE_SUSPEND_THREAD]
(suspend_self_inner): Likewise.
* include/private/pthread_support.h [GC_ENABLE_SUSPEND_THREAD]
(GC_Thread_Rep.suspended_ext): Likewise.
* misc.c [THREADS] (GC_set_suspend_signal, GC_set_thr_restart_signal,
GC_get_suspend_signal, GC_get_thr_restart_signal): Likewise.
* os_dep.c [MPROTECT_VDB && !DARWIN && !MSWIN32 && !MSWINCE]
(GC_dirty_init): Likewise.
* pthread_support.c [PARALLEL_MARK && !NO_MARKER_SPECIAL_SIGMASK]
(GC_start_mark_threads_inner): Likewise.
* pthread_support.c [BASE_ATOMIC_OPS_EMULATED] (GC_thr_init): Likewise.
* pthread_support.c [GC_ENABLE_SUSPEND_THREAD] (GC_register_my_thread):
Likewise.
* tests/gctest.c [GC_PTHREADS && GC_ENABLE_SUSPEND_THREAD
&& !GC_OSF1_THREADS] (fork_a_thread): Likewise.
* include/private/gcconfig.h [GC_PTHREADS && !GC_DARWIN_THREADS
&& !GC_WIN32_THREADS && !PLATFORM_STOP_WORLD && !SN_TARGET_PSP2]
(PTHREAD_STOP_WORLD_IMPL): Define.
* include/private/gcconfig.h [PTHREAD_STOP_WORLD_IMPL && !NACL
&& !GC_OPENBSD_UTHREADS] (SIGNAL_BASED_STOP_WORLD): Likewise.
* include/private/pthread_support.h [!GC_DARWIN_THREADS]: Include
pthread_stop_world.h only if PTHREAD_STOP_WORLD_IMPL.
* pthread_stop_world.c: Check PTHREAD_STOP_WORLD_IMPL macro instead of
GC_PTHREADS, GC_WIN32_THREADS, GC_DARWIN_THREADS, PLATFORM_STOP_WORLD,
SN_TARGET_PSP2.
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r-- | pthread_stop_world.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c index e5419347..11655282 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -18,9 +18,7 @@ #include "private/pthread_support.h" -#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && \ - !defined(GC_DARWIN_THREADS) && !defined(PLATFORM_STOP_WORLD) \ - && !defined(SN_TARGET_PSP2) +#ifdef PTHREAD_STOP_WORLD_IMPL #ifdef NACL # include <unistd.h> @@ -1404,4 +1402,4 @@ GC_INNER void GC_stop_init(void) # endif /* !GC_OPENBSD_UTHREADS && !NACL */ } -#endif /* GC_PTHREADS && !GC_DARWIN_THREADS && !GC_WIN32_THREADS */ +#endif /* PTHREAD_STOP_WORLD_IMPL */ |