| plan 9 kernel history: overview | file list | diff list |
1990/03091/port/proc.c (diff list | history)
| 1990/0309/sys/src/9/port/proc.c:195,208 – 1990/03091/sys/src/9/port/proc.c:195,209 (short | long | prev | next) | ||
|
Allocate process locks all at once rather than on-demand at possibly bad times.
(See power/lock.c)
Code rearrangement: wakeme, twakeme.
| ||
| 1990/0227 | Proc *p; int i; | |
| 1990/03091 | for(i=0; i<conf.nproc-1; i++,p++){ lock(p); /* allocate now, not during wakeup */ unlock(p); | |
| 1990/0227 | p->qnext = p+1; | |
| 1990/03091 | } | |
| 1990/0227 | p->qnext = 0; } | |
| 1990/0309/sys/src/9/port/proc.c:288,293 – 1990/03091/sys/src/9/port/proc.c:289,307 | ||
| 1990/0227 | splx(s); } | |
| 1990/03091 | void wakeme(Alarm *a) { ready((Proc*)(a->arg)); cancel(a); } void twakeme(Alarm *a) { wakeup((Rendez*)(a->arg)); } | |
| 1990/0227 | int postnote(Proc *p, int dolock, char *n, int flag) { | |
| 1990/0309/sys/src/9/port/proc.c:322,340 – 1990/03091/sys/src/9/port/proc.c:336,341 | ||
| 1990/0227 | splx(s); } return 1; | |