summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-01-26 11:41:35 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-01-26 11:41:35 +0000
commit0dbb100b9b26b3e64ac1a63f6aa7dec6f3b000f1 (patch)
treee3b6f27545368a6af5135acaa9f1002337a9fac9 /sys/kern/kern_exit.c
parente70e84624327d2dc37662462a37f44947daa7b23 (diff)
Notes
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 0b2c2e80f060..ce9a18cd6cae 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);