summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2004-06-18 06:21:09 +0000
committerdavidxu <davidxu@FreeBSD.org>2004-06-18 06:21:09 +0000
commit70a732669be740b5518c07625a38b3e82a13f6d4 (patch)
tree537d2a35c86bb808ea690a0ec08cf4bc2d6275f7 /sys/kern
parent673364f0efdd7d960926bfef902c7a229cc7db96 (diff)
downloadFreeBSD-src-70a732669be740b5518c07625a38b3e82a13f6d4.zip
FreeBSD-src-70a732669be740b5518c07625a38b3e82a13f6d4.tar.gz
Remove a bogus panic. It is possible more than one threads will
be suspended in thread_suspend_check, after they are resumed, all threads will call thread_single, but only one can be success, others should retry and will exit in thread_suspend_check.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index f046154..859612b 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -133,6 +133,7 @@ exit1(struct thread *td, int rv)
*/
PROC_LOCK(p);
if (p->p_flag & P_SA || p->p_numthreads > 1) {
+retry:
/*
* First check if some other thread got here before us..
* if so, act apropriatly, (exit or suspend);
@@ -154,7 +155,7 @@ exit1(struct thread *td, int rv)
* thread exits.
*/
if (thread_single(SINGLE_EXIT))
- panic ("Exit: Single threading fouled up");
+ goto retry;
/*
* All other activity in this process is now stopped.
* Remove excess KSEs and KSEGRPS. XXXKSE (when we have them)
OpenPOWER on IntegriCloud