summaryrefslogtreecommitdiff
path: root/pthread_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-04-01 14:18:55 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-04-01 14:33:30 +0300
commit7089975f1889bd4718fb1987e7b474736ae9637b (patch)
tree0e7bc820835e0044433771dc1404b2cbda3b1a34 /pthread_stop_world.c
parentf3aa9beafdcaae1bdc7c11e7b9e5a620b060eeca (diff)
downloadbdwgc-7089975f1889bd4718fb1987e7b474736ae9637b.tar.gz
Use SIGSYS to suspend thread on Hurd, FreeBSD, RTEMS if built with TSan
Also, support GC_USESIGRT_SIGNALS and SUSPEND_HANDLER_NO_CONTEXT macros properly on the entitled platforms. * include/private/gc_priv.h [SIGNAL_BASED_STOP_WORLD && !SIG_SUSPEND && !THREAD_SANITIZER && !GC_LINUX_THREADS && !GC_DGUX386_THREADS && !GC_USESIGRT_SIGNALS && (GC_FREEBSD_THREADS || HURD || RTEMS)] (SIG_SUSPEND): Define to SIGUSR1 (or 32+6). * include/private/gcconfig.h [(POWERPC || SPARC || I386 || MIPS || ALPHA || AARCH64 || ARM32 || X86_64 || RISCV) && FREEBSD || I386 && (RTEMS || HURD)] (SIG_SUSPEND, SIG_THR_RESTART): Remove. * pthread_stop_world.c [!SIG_THR_RESTART && !SUSPEND_HANDLER_NO_CONTEXT && !GC_HPUX_THREADS && !GC_OSF1_THREADS && !GC_NETBSD_THREADS && !GC_USESIGRT_SIGNALS && (GC_FREEBSD_THREADS || HURD || RTEMS)] (SIG_THR_RESTART): Define to SIGUSR2 (or 32+5).
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r--pthread_stop_world.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c
index 26dcd79f..ba0771c9 100644
--- a/pthread_stop_world.c
+++ b/pthread_stop_world.c
@@ -172,6 +172,10 @@ STATIC volatile AO_t GC_stop_count;
# else
# define SIG_THR_RESTART SIGRTMIN + 5
# endif
+# elif defined(GC_FREEBSD_THREADS) && defined(__GLIBC__)
+# define SIG_THR_RESTART (32+5)
+# elif defined(GC_FREEBSD_THREADS) || defined(HURD) || defined(RTEMS)
+# define SIG_THR_RESTART SIGUSR2
# else
# define SIG_THR_RESTART SIGXCPU
# endif