| plan 9 kernel history: overview | file list | diff list |
1991/0705/pc/clock.c (diff list | history)
| pc/clock.c on 1991/0704 | ||
| 1991/0704 | #include "u.h" #include "lib.h" #include "mem.h" #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) { 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; } | |