| plan 9 kernel history: overview | file list | diff list |
1991/0704/pc/clock.c (diff list | history)
| 1991/0704/sys/src/9/pc/clock.c:4,11 – 1991/0705/sys/src/9/pc/clock.c:4,22 (short | long | prev | next) | ||
| 1991/0704 | #include "dat.h" #include "fns.h" #include "io.h" | |
| 1991/0705 | /* * 8253 timer */ enum { Timerctl= 0x43, /* control port */ Timercnt= 0x40, /* timer count port (outb count-1) */ Timericnt= 0x41, /* timer count input port */ Timerlatch= 0x40, /* latch count into Timericnt */ }; | |
| 1991/0704 | void clockinit(void) { | |
| 1991/0704/sys/src/9/pc/clock.c:12,14 – 1991/0705/sys/src/9/pc/clock.c:23,33 | ||
| 1991/0704 | setvec(Clockvec, clock, SEGIG); } | |
| 1991/0705 | void clock(void *arg) { m->ticks++; if((m->ticks%185)==0) print("%d secs\n", TK2SEC(m->ticks)); INT0ENABLE; } | |