diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-30 19:41:34 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-30 19:41:34 +0200 |
commit | 347ac6ef58d82e714358935568abcffd3509cfe8 (patch) | |
tree | 464724d0e0c56a2b95ce1b649552bf77cde5bc82 /sys/src/9/pc/fns.h | |
parent | 2204bb732132fc98ad099da04e528968a91bfe87 (diff) |
guesscpuhz(), apm suspend
use fastclock timer (pit2) to measure cpufreq in guesscpuhz(). this
gives a bigger period minimizing the danger of overrun as pit2 runs
at the constant maximum period of 0x10000 ticks. also use smaller
loop increments (1000) and bigger maximum loop upper bound.
move the loops < ... check to the bottom of the loop so we get the
effective count *before* adding the next loop increment.
ilock() while doing measurements in guesscpuhz() to prevent accidents
with other processors reading fastclock or doing guesscpuhz()
in parralel.
export new i8253reset() function for apm to reset the timers after
a apm bios suspend.
Diffstat (limited to 'sys/src/9/pc/fns.h')
-rw-r--r-- | sys/src/9/pc/fns.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/9/pc/fns.h b/sys/src/9/pc/fns.h index e9e899f03..5024723b2 100644 --- a/sys/src/9/pc/fns.h +++ b/sys/src/9/pc/fns.h @@ -54,6 +54,7 @@ void i8250mouse(char*, int (*)(Queue*, int), int); void i8250setmouseputc(char*, int (*)(Queue*, int)); void i8253enable(void); void i8253init(void); +void i8253reset(void); uvlong i8253read(uvlong*); void i8253timerset(uvlong); int i8259disable(int); |