| plan 9 kernel history: overview | file list | diff list |
1998/0901/port/proc.c (diff list | history)
| 1998/0825/sys/src/9/port/proc.c:186,194 – 1998/0901/sys/src/9/port/proc.c:186,194 (short | long | prev | next) | ||
|
Yet another runproc implementation.
rsc Mon Mar 20 20:36:30 2006 | ||
| 1990/0227 | Proc* runproc(void) { | |
| 1995/0110 |
| |
| 1998/0901 | Schedq *rq, *xrq; | |
| 1995/0110 | Proc *p, *l; | |
| 1998/0901 | ulong rt; | |
| 1990/0227 | loop: | |
| 1995/0110 | ||
| 1998/0825/sys/src/9/port/proc.c:198,236 – 1998/0901/sys/src/9/port/proc.c:198,239 | ||
| 1995/0110 | */ | |
| 1992/0603 | spllo(); | |
| 1995/0912 | for(;;){ | |
| 1995/0110 |
| |
| 1996/0315 |
| |
| 1995/0110 |
| |
| 1998/0606 |
| |
| 1998/0901 | if((++(m->fairness) & 3) == 0){ /* * once in a while, run process that's been waiting longest * regardless of movetime */ rt = 0xffffffff; xrq = nil; | |
| 1995/0110 | for(rq = runq; rq < &runq[Nrq]; rq++){ p = rq->head; | |
| 1996/0315 | if(p == 0) | |
| 1995/0110 | continue; | |
| 1998/0901 | if(p->readytime < rt){ xrq = rq; rt = p->readytime; } } if(xrq != nil){ rq = xrq; p = rq->head; if(p != nil) p->movetime = 0; } } else { /* * get highest priority process that this * processor can run given affinity constraints */ for(rq = &runq[Nrq-1]; rq >= runq; rq--){ p = rq->head; if(p == 0) continue; | |
| 1996/0315 | for(; p; p = p->rnext){ | |
| 1998/0901 | if(p->mp == MACHP(m->machno) || p->movetime < m->ticks) | |
| 1996/0315 | goto found; } | |
| 1995/0110 |
| |
| 1994/0918 |
| |
| 1995/0110 |
| |
| 1994/0918 |
| |
| 1995/0110 |
| |
| 1996/0315 |
| |
| 1995/0110 |
| |
| 1994/0729 | } | |