cvs commit: src/sys/i386/isa clock.c

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Jan 7 02:59:58 PST 2004


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 at 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





More information about the Commits mailing list