Use the cached value within comparison.

Submitted by:	jhb
This commit is contained in:
Attilio Rao 2010-02-19 15:10:05 +00:00
parent 3aadd65dbb
commit fb7c88e695
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204089

View File

@ -317,7 +317,7 @@ kthread_exit(void)
/* A module may be waiting for us to exit. */
wakeup(curthread);
PROC_LOCK(p);
if (curthread->td_proc->p_numthreads == 1) {
if (p->p_numthreads == 1) {
PROC_UNLOCK(p);
kproc_exit(0);