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.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 96e9cf2..747fb3b 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -134,7 +134,7 @@ exit1(struct thread *td, int rv)
* MUST abort all other threads before proceeding past here.
*/
PROC_LOCK(p);
- if (p->p_flag & P_SA || p->p_numthreads > 1) {
+ if (p->p_flag & P_HADTHREADS) {
retry:
/*
* First check if some other thread got here before us..
@@ -164,13 +164,8 @@ retry:
goto retry;
/*
* All other activity in this process is now stopped.
- * Remove excess KSEs and KSEGRPS. XXXKSE (when we have them)
- * ...
- * Turn off threading support.
+ * Threading support has been turned off.
*/
- p->p_flag &= ~P_SA;
- td->td_pflags &= ~TDP_SA;
- thread_single_end(); /* Don't need this any more. */
}
p->p_flag |= P_WEXIT;
@@ -385,16 +380,6 @@ retry:
lim_free(plim);
/*
- * Release this thread's reference to the ucred. The actual proc
- * reference will stay around until the proc is harvested by
- * wait(). At this point the ucred is immutable (no other threads
- * from this proc are around that can change it) so we leave the
- * per-thread ucred pointer intact in case it is needed although
- * in theory nothing should be using it at this point.
- */
- crfree(td->td_ucred);
-
- /*
* Remove proc from allproc queue and pidhash chain.
* Place onto zombproc. Unlink from parent's child list.
*/
OpenPOWER on IntegriCloud