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;
|
||||
}
|
||||
|
||||
if(up != p)
|
||||
if(up != p && (p->wired == nil || p->wired == MACHP(m->machno)))
|
||||
m->readied = p; /* group scheduling */
|
||||
|
||||
updatecpu(p);
|
||||
|
@ -511,6 +511,7 @@ runproc(void)
|
|||
|
||||
/* cooperative scheduling until the clock ticks */
|
||||
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){
|
||||
skipscheds++;
|
||||
rq = &runq[p->priority];
|
||||
|
|
Loading…
Reference in a new issue