From 97b4306f0f68af77925a2f7cf69de185f2a46c1c Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 3 Jul 2001 08:00:57 +0000 Subject: [PATCH] Just check p_oncpu when determining if a process is executing or not. We already did this in the SMP case, and it is now maintained in the UP case as well, and makes the code slightly more readable. Note that curproc is always executing, thus the p != curproc test does not need to be performed if the p_oncpu check is made. --- sys/kern/kern_synch.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index f092f1f3377a..0b860a057378 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -283,10 +283,7 @@ schedcpu(arg) p->p_estcpu = decay_cpu(loadfac, p->p_estcpu); resetpriority(p); if (p->p_pri.pri_level >= PUSER) { - if ((p != curproc) && -#ifdef SMP - p->p_oncpu == NOCPU && /* idle */ -#endif + if (p->p_oncpu == NOCPU && /* idle */ p->p_stat == SRUN && (p->p_sflag & PS_INMEM) && (p->p_pri.pri_level / RQ_PPQ) !=