lkml.org 
[lkml]   [1999]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: time jumps
Date
> I've written a device driver under 2.0.37. Having acquired a block of
> data, the interrupt routine add a timestamp obtained with do_gettimeofday.

You shouldnt call gettimeofday() from an interrupt handler. Its slow
and its not safe on machines without a hardware TSC. You can check the
flags and call the do_fast version or use 'jiffies' for slow boxes

> I suppose that when my driver, from its interrupt routine, call
> do_gettimeofday, there is a timer interrupt pending. Is it something I
> could do to be sure the timer interrupt is serviced, if required, before
> reading the time ?

Not really. The timer int can always become pending between your check
and the time you act on the decision - you can never completely close that
window


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

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.053 / U:1.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site