| plan 9 kernel history: overview | file list | diff list |
1991/1113/gnot/clock.c (diff list | history)
| 1991/1112/sys/src/9/gnot/clock.c:22,28 – 1991/1113/sys/src/9/gnot/clock.c:22,28 (short | long | prev | next) | ||
| 1990/03091 | clock(Ureg *ur) { Proc *p; | |
| 1991/1112 |
| |
| 1991/1113 | int user, nrun = 0; | |
| 1990/03091 | ||
| 1991/1112 | user = (ur->sr&SUPER) == 0; if(user) | |
| 1991/1112/sys/src/9/gnot/clock.c:32,41 – 1991/1113/sys/src/9/gnot/clock.c:32,44 | ||
| 1990/03091 | m->ticks++; p = m->proc; | |
| 1990/0312 | if(p){ | |
| 1991/1113 | nrun = 1; | |
| 1990/0312 | p->pc = ur->pc; | |
| 1990/1004 | if (p->state==Running) p->time[p->insyscall]++; | |
| 1990/0312 | } | |
| 1991/1113 | nrun = (nrdy+nrun)*1000; MACHP(0)->load = (MACHP(0)->load*19+nrun)/20; | |
| 1990/1211 | checkalarms(); | |
| 1990/0321 | kbdclock(); | |
| 1990/0504 | mouseclock(); | |