Messages in this thread | | | From | (Alan Cox) | Subject | Re: time jumps | Date | Tue, 4 May 1999 00:37:23 +0100 (BST) |
| |
> 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/
| |