Mark the thread in an exiting program as inactive.

This is not really used by the process but it's confusing to some
status readers to see zombie processes the "runnin" threads.

Pointed out by: Don Lewis <truckman@FreeBSD.org>
This commit is contained in:
Julian Elischer 2004-06-21 20:44:02 +00:00
parent 5fd2bb173d
commit dcc9954eb9

View File

@ -682,7 +682,6 @@ thread_exit(void)
kse_reassign(ke);
PROC_UNLOCK(p);
td->td_kse = NULL;
td->td_state = TDS_INACTIVE;
#if 0
td->td_proc = NULL;
#endif
@ -692,6 +691,7 @@ thread_exit(void)
} else {
PROC_UNLOCK(p);
}
td->td_state = TDS_INACTIVE;
/* XXX Shouldn't cpu_throw() here. */
mtx_assert(&sched_lock, MA_OWNED);
cpu_throw(td, choosethread());