DragonFly commits List (threaded) for 2004-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/sys/i386/isa clock.c
dillon 2004/01/07 02:59:09 PST
DragonFly src repository
Modified files:
sys/i386/isa clock.c
Log:
Compensate for the frequency error that occurs at higher 'hz' settings.
e.g. by default at 100hz the 8254 running at 1193182Hz needs
a count load of 11931.82, but we can only load integer values so the
clock interrupt winds up being slightly slower or faster then 100hz.
This will fix phase creep in things like nanosleep().
The problem is solved by keeping track of the fractional error and
adjusting the counter load register for the following interrupt.
Report-by: Paul Herman <pherman@xxxxxxxxxxxxxxx>
Revision Changes Path
1.8 +38 -11 src/sys/i386/isa/clock.c
http://www.dragonflybsd.org/cvsweb/src/sys/i386/isa/clock.c.diff?r1=1.7&r2=1.8&f=h
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]