Re: HELP: gettimeofday() jumps backwards

From: Markus Pietrek (mpietrek_nospam_at_fsforth.de)
Date: 05/18/04


Date: Tue, 18 May 2004 10:12:59 +0200

Hi Sol,

I just fixed such a problem in my timer driver for the NS7520 in uClinux.
The cause of pain was that timer registers were automatically reloaded
while handling do_gettimeofday (before calling gettimeoffset). As
interrupts are disabled, jiffies is not incremented then. So, with
gettimeoffset returning the elapsed time since last reload (==0) and
jiffies the same, this looks like a jump back.

Therefore I had to manage this case in gettimeoffset.

Bye,

-- 
Markus Pietrek
(Remove _nospam from email address before replying)