| plan 9 kernel history: overview | file list | diff list |
1990/0731/power/clock.c (diff list | history)
| 1990/0728/sys/src/9/power/clock.c:107,119 – 1990/0731/sys/src/9/power/clock.c:107,129 (short | long | prev | next) | ||
| 1990/0227 | junk3[3]; }; | |
| 1990/0731 | ||
| 1990/0227 | #define TIME0 (36*MS2HZ/10) | |
| 1990/0731 | #define TIME1 0xFFFFFFFF /* profiling disabled */ | |
| 1990/0227 | #define TIME2 1024 #define CTR(x) ((x)<<6) /* which counter x */ #define SET16 0x30 /* lsbyte then msbyte */ #define MODE2 0x04 /* interval timer */ | |
| 1990/0731 | #define PROFILING #ifdef PROFILING #undef TIME1 #define TIME1 211 /* profiling clock; prime; about 10ms per tick */ #define NPROF 50000 ulong profcnt[MAXMACH*NPROF]; #endif | |
| 1990/0227 | void clockinit(void) { | |
| 1990/0728/sys/src/9/power/clock.c:135,143 – 1990/0731/sys/src/9/power/clock.c:145,155 | ||
| 1990/0227 | m->ticks = 0; } | |
| 1990/0731 | ||
| 1990/0728 | #define NA 10 | |
| 1990/0227 | void | |
| 1990/0731 | clock(ulong n, ulong pc) | |
| 1990/0227 | { | |
| 1990/0728 | int i, na; | |
| 1990/0227 | Alarm *a; | |
| 1990/0728/sys/src/9/power/clock.c:192,198 – 1990/0731/sys/src/9/power/clock.c:204,218 | ||
| 1990/0227 | return; } if(n & INTR4){ | |
| 1990/0731 | extern ulong start; | |
| 1990/0227 | i = *CLRTIM1; | |
| 1990/0731 | #ifdef PROFILING pc -= (ulong)&start; pc /= sizeof(ulong); if(pc < NPROF) profcnt[m->machno*NPROF+pc]++; #endif | |
| 1990/0227 | return; } } | |