summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 0b2c2e8..ce9a18c 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -147,7 +147,7 @@ exit1(td, rv)
}
/*
- * XXXXKSE: MUST abort all other threads before proceeding past here.
+ * XXXKSE: MUST abort all other threads before proceeding past here.
*/
PROC_LOCK(p);
if (p->p_flag & P_KSES) {
@@ -156,17 +156,6 @@ exit1(td, rv)
* if so, act apropriatly, (exit or suspend);
*/
thread_suspend_check(0);
- /*
- * Here is a trick..
- * We need to free up our KSE to process other threads
- * so that we can safely set the UNBOUND flag
- * (whether or not we have a mailbox) as we are NEVER
- * going to return to the user.
- * The flag will not be set yet if we are exiting
- * because of a signal, pagefault, or similar
- * (or even an exit(2) from the UTS).
- */
- td->td_flags |= TDF_UNBOUND;
/*
* Kill off the other threads. This requires
@@ -192,7 +181,6 @@ exit1(td, rv)
* Turn off threading support.
*/
p->p_flag &= ~P_KSES;
- td->td_flags &= ~TDF_UNBOUND;
thread_single_end(); /* Don't need this any more. */
}
/*
@@ -237,8 +225,10 @@ exit1(td, rv)
*/
TAILQ_FOREACH(ep, &exit_list, next)
(*ep->function)(p);
-
+
+ PROC_LOCK(p);
stopprofclock(p);
+ PROC_UNLOCK(p);
MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
M_ZOMBIE, 0);
OpenPOWER on IntegriCloud