kernel: fix cooperative scheduling for wired processes

This commit is contained in:
cinap_lenrek 2014-06-23 20:29:10 +02:00
parent 87d5626af0
commit 7cf6a35486

View file

@ -425,7 +425,7 @@ ready(Proc *p)
return; return;
} }
if(up != p) if(up != p && (p->wired == nil || p->wired == MACHP(m->machno)))
m->readied = p; /* group scheduling */ m->readied = p; /* group scheduling */
updatecpu(p); updatecpu(p);
@ -511,6 +511,7 @@ runproc(void)
/* cooperative scheduling until the clock ticks */ /* cooperative scheduling until the clock ticks */
if((p=m->readied) && p->mach==0 && p->state==Ready if((p=m->readied) && p->mach==0 && p->state==Ready
&& (p->wired == nil || p->wired == MACHP(m->machno))
&& runq[Nrq-1].head == nil && runq[Nrq-2].head == nil){ && runq[Nrq-1].head == nil && runq[Nrq-2].head == nil){
skipscheds++; skipscheds++;
rq = &runq[p->priority]; rq = &runq[p->priority];