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:
parent
5fd2bb173d
commit
dcc9954eb9
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user