* timeout = 1 millisecond for wait_event_timeout
@ 2007-03-05 16:58 Mockern
2007-03-05 18:06 ` Nish Aravamudan
0 siblings, 1 reply; 2+ messages in thread
From: Mockern @ 2007-03-05 16:58 UTC (permalink / raw)
To: linux-kernel
Hi,
I have a question. How can I make timeout = 1 millisecond for wait_event_timeout
function?
Something like (HZ/1000)*x?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: timeout = 1 millisecond for wait_event_timeout
2007-03-05 16:58 timeout = 1 millisecond for wait_event_timeout Mockern
@ 2007-03-05 18:06 ` Nish Aravamudan
0 siblings, 0 replies; 2+ messages in thread
From: Nish Aravamudan @ 2007-03-05 18:06 UTC (permalink / raw)
To: Mockern; +Cc: linux-kernel
On 3/5/07, Mockern <Mockern@yandex.ru> wrote:
> Hi,
>
> I have a question. How can I make timeout = 1 millisecond for wait_event_timeout
> function?
>
> Something like (HZ/1000)*x?
You mean in a HZ-independent way?
Use msecs_to_jiffies().
Note, that if HZ==1000, you can do wait_event-( , ,0); and you will
get as close to 1 millisecond as possible (there are no guarantees for
schedule_timeout(), the underlying function to wait_event_timeout()).
Thanks,
Nish
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-05 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-05 16:58 timeout = 1 millisecond for wait_event_timeout Mockern
2007-03-05 18:06 ` Nish Aravamudan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®