summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-03-21 10:05:15 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-03-21 10:05:15 +0000
commitd7a46921182ef38f371dd113e928fe9a966c9118 (patch)
tree05909e1b27981021d35514ef97d271f95fcbcacd /sys/kern/kern_thread.c
parent5788f4caf7d16c6140217721a673106629443716 (diff)
downloadFreeBSD-src-d7a46921182ef38f371dd113e928fe9a966c9118.zip
FreeBSD-src-d7a46921182ef38f371dd113e928fe9a966c9118.tar.gz
Rethink it a bit, if there is a STOP flag, don't bother to resume other
threads.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 44d5a6b..11c194a 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -767,6 +767,8 @@ thread_single(int mode)
else
remaining = p->p_numthreads - p->p_suspcount;
while (remaining != 1) {
+ if (P_SHOULDSTOP(p) != P_STOPPED_SINGLE)
+ goto stopme;
FOREACH_THREAD_IN_PROC(p, td2) {
if (td2 == td)
continue;
@@ -822,6 +824,7 @@ thread_single(int mode)
if (remaining == 1)
break;
+stopme:
/*
* Wake us up when everyone else has suspended.
* In the mean time we suspend as well.
OpenPOWER on IntegriCloud