Re: [PATCH] Re: time() glitch on 2.4.18: solved

Jim Paris (jim@jtan.com)
Tue, 5 Nov 2002 13:02:22 -0500


> > > + if (count > LATCH) {
> >
> > may be (count >= LATCH) would be even better ?
>
> Some PIT clones seem to hold the LATCH value momentarily judging by
> other things that were triggered wrongly by >=

If so, then that's a separate problem: the later code

count = ((LATCH-1) - count) * TICK_SIZE;
delay_at_last_interrupt = (count + LATCH/2) / LATCH;

will cause delay_at_last_interrupt to be negative, so you'll see
backwards jumps in time and occasional wraparound of usecs as I did.
Perhaps a

if (count == LATCH)
count--;

after the reset code?

-jim
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/