Re: newbie delay/sleep question
- From: Aaron Isotton <aaron@xxxxxxxxxxx>
- Date: Mon, 11 Dec 2006 22:25:06 +0100
cstahl3 wrote:
I am developing a device driver that handles an interrupt. When my
device driver receives the interrupt I would like to sleep for 100
microseconds and then do some other task. My problem is I may receive
another interrupt within that 100 microseconds and the sleep I've been
trying to do is blocking the next guy from executing on time (waiting
for the first guy to finish sleeping).
I've been looking at using timers, task queues, and work queues, but
I'm not exactly sure if that's the way to go and it seems if I base my
delay on jiffies, I will not be able to satisfy my microsecond sleep
requirement. Any ideas?
Jiffies are increased at every tick (kernel tick, not clock tick), so
you usually get between 0.001 and 0.0001s granularity, depending on your
kernel configuration.
The most accurate clock source you can get is usually the TSC (rdtsc and
friends). But beware of CPUs with broken TSCs (such as some Geodes).
Greetings,
Aaron
.
- Follow-Ups:
- Re: newbie delay/sleep question
- From: malc
- Re: newbie delay/sleep question
- References:
- newbie delay/sleep question
- From: cstahl3
- newbie delay/sleep question
- Prev by Date: newbie delay/sleep question
- Next by Date: Re: newbie delay/sleep question
- Previous by thread: newbie delay/sleep question
- Next by thread: Re: newbie delay/sleep question
- Index(es):
Relevant Pages
|