Use the cached value within comparison.

Submitted by:	jhb
This commit is contained in:
attilio 2010-02-19 15:10:05 +00:00
parent d4d3373f23
commit 3138bddc87

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);