kernel: fix cooperative scheduling for wired processes
This commit is contained in:
parent
87d5626af0
commit
7cf6a35486
1 changed files with 2 additions and 1 deletions
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue