summaryrefslogtreecommitdiff
path: root/pthread_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-03-28 14:23:17 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-03-28 14:23:17 +0300
commitc67bff2e3c8c8ba32cdae5c718bfc6ae45936b55 (patch)
tree624eb8b229e2280083bdcf3fe87aff0916295815 /pthread_stop_world.c
parenteddbd924a208aa4f25717b736cf01aac3c600450 (diff)
downloadbdwgc-c67bff2e3c8c8ba32cdae5c718bfc6ae45936b55.tar.gz
Use same signal for threads suspend/resume by default on E2K and similar
If context is not passed to GC_suspend_handler, then GC_sig_thr_restart is set to the same number as GC_sig_suspend. * pthread_stop_world.c [!SIG_THR_RESTART && SUSPEND_HANDLER_NO_CONTEXT] (SIG_THR_RESTART): Define to SIG_SUSPEND.
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r--pthread_stop_world.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c
index 6a3ed809..7f120f13 100644
--- a/pthread_stop_world.c
+++ b/pthread_stop_world.c
@@ -162,7 +162,10 @@ STATIC volatile AO_t GC_stop_count;
* pointer(s) and acknowledge.
*/
#ifndef SIG_THR_RESTART
-# if defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) \
+# ifdef SUSPEND_HANDLER_NO_CONTEXT
+ /* Reuse the suspend signal. */
+# define SIG_THR_RESTART SIG_SUSPEND
+# elif defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) \
|| defined(GC_NETBSD_THREADS) || defined(GC_USESIGRT_SIGNALS)
# if defined(_SIGRTMIN) && !defined(CPPCHECK)
# define SIG_THR_RESTART _SIGRTMIN + 5
@@ -172,7 +175,7 @@ STATIC volatile AO_t GC_stop_count;
# else
# define SIG_THR_RESTART SIGXCPU
# endif
-#endif
+#endif /* !SIG_THR_RESTART */
#define SIGNAL_UNSET (-1)
/* Since SIG_SUSPEND and/or SIG_THR_RESTART could represent */