summaryrefslogtreecommitdiff
path: root/pthread_stop_world.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r--pthread_stop_world.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c
index 7713da9d..65dd2319 100644
--- a/pthread_stop_world.c
+++ b/pthread_stop_world.c
@@ -647,6 +647,12 @@ STATIC void GC_restart_handler(int sig)
UNLOCK();
return;
}
+ if ((t -> flags & FINISHED) != 0 || t -> thread_blocked) {
+ t -> suspended_ext = TRUE;
+ /* Terminated but not joined yet, or in do-blocking state. */
+ UNLOCK();
+ return;
+ }
if (THREAD_EQUAL((pthread_t)thread, pthread_self())) {
t -> suspended_ext = TRUE;
@@ -656,12 +662,6 @@ STATIC void GC_restart_handler(int sig)
(void)GC_do_blocking(GC_suspend_self_inner, t);
return;
}
- if ((t -> flags & FINISHED) != 0) {
- t -> suspended_ext = TRUE;
- /* Terminated but not joined yet. */
- UNLOCK();
- return;
- }
DISABLE_CANCEL(cancel_state);
/* GC_suspend_thread is not a cancellation point. */