* Question: 20 microseconds delay
@ 2007-03-03 14:20 Mockern
2007-03-03 14:32 ` Jiri Slaby
2007-03-03 14:33 ` Hans-Jürgen Koch
0 siblings, 2 replies; 7+ messages in thread
From: Mockern @ 2007-03-03 14:20 UTC (permalink / raw)
To: linux-kernel
Hi,
I have a question.
I need to use 20 microsecond delay in my driver.
What exact jiffies value I should define to get 20 microseconds?
Thank you
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question: 20 microseconds delay
2007-03-03 14:20 Question: 20 microseconds delay Mockern
@ 2007-03-03 14:32 ` Jiri Slaby
2007-03-03 14:46 ` Mockern
2007-03-03 14:33 ` Hans-Jürgen Koch
1 sibling, 1 reply; 7+ messages in thread
From: Jiri Slaby @ 2007-03-03 14:32 UTC (permalink / raw)
To: Mockern; +Cc: linux-kernel
Mockern napsal(a):
> Hi,
>
> I have a question.
>
> I need to use 20 microsecond delay in my driver.
> What exact jiffies value I should define to get 20 microseconds?
It's subjiffy delay unless you use 50000 HZ :). Use udelay.
regards,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
Hnus <hnus@fi.muni.cz> is an alias for /dev/null
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question: 20 microseconds delay
2007-03-03 14:32 ` Jiri Slaby
@ 2007-03-03 14:46 ` Mockern
2007-03-03 14:52 ` Jiri Slaby
0 siblings, 1 reply; 7+ messages in thread
From: Mockern @ 2007-03-03 14:46 UTC (permalink / raw)
To: jirislaby; +Cc: linux-kernel
The problem is that I need to use wait_event_timeout function.
>Mockern napsal(a):
>> Hi,
>>
>> I have a question.
>>
>> I need to use 20 microsecond delay in my driver.
>> What exact jiffies value I should define to get 20 microseconds?
>
>It's subjiffy delay unless you use 50000 HZ :). Use udelay.
>
>regards,
--
Яндекс.Почта: объем почтового ящика не ограничен! http://mail.yandex.ru/monitoring/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question: 20 microseconds delay
2007-03-03 14:46 ` Mockern
@ 2007-03-03 14:52 ` Jiri Slaby
0 siblings, 0 replies; 7+ messages in thread
From: Jiri Slaby @ 2007-03-03 14:52 UTC (permalink / raw)
To: Mockern; +Cc: linux-kernel
Do not top-post, please.
Mockern napsal(a):
>> Mockern napsal(a):
>>> I need to use 20 microsecond delay in my driver.
>>> What exact jiffies value I should define to get 20 microseconds?
>> It's subjiffy delay unless you use 50000 HZ :). Use udelay.
>
> The problem is that I need to use wait_event_timeout function.
Hardly. Place a piece of code here or describe what do you want to achieve.
regards,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E
Hnus <hnus@fi.muni.cz> is an alias for /dev/null
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question: 20 microseconds delay
2007-03-03 14:20 Question: 20 microseconds delay Mockern
2007-03-03 14:32 ` Jiri Slaby
@ 2007-03-03 14:33 ` Hans-Jürgen Koch
2007-03-03 14:47 ` Mockern
1 sibling, 1 reply; 7+ messages in thread
From: Hans-Jürgen Koch @ 2007-03-03 14:33 UTC (permalink / raw)
To: Mockern; +Cc: linux-kernel
Am Samstag 03 März 2007 15:20 schrieb Mockern:
> Hi,
>
> I have a question.
>
> I need to use 20 microsecond delay in my driver.
> What exact jiffies value I should define to get 20 microseconds?
You can't do it with jiffies as they have 1 millisecond resolution at best.
You'd use something like usleep(20) instead.
Hans
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question: 20 microseconds delay
2007-03-03 14:33 ` Hans-Jürgen Koch
@ 2007-03-03 14:47 ` Mockern
2007-03-03 21:02 ` Bill Davidsen
0 siblings, 1 reply; 7+ messages in thread
From: Mockern @ 2007-03-03 14:47 UTC (permalink / raw)
To: hjk; +Cc: linux-kernel
The problem is that I need to use wait_event_timeout function
>Am Samstag 03 Mдrz 2007 15:20 schrieb Mockern:
>> Hi,
>>
>> I have a question.
>>
>> I need to use 20 microsecond delay in my driver.
>> What exact jiffies value I should define to get 20 microseconds?
>
>You can't do it with jiffies as they have 1 millisecond resolution at best.
>You'd use something like usleep(20) instead.
>
>Hans
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
--
Сегодня удачный день, чтобы завести почту на Яндексе http://mail.yandex.ru
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Question: 20 microseconds delay
2007-03-03 14:47 ` Mockern
@ 2007-03-03 21:02 ` Bill Davidsen
0 siblings, 0 replies; 7+ messages in thread
From: Bill Davidsen @ 2007-03-03 21:02 UTC (permalink / raw)
To: Mockern; +Cc: hjk, linux-kernel
Mockern wrote:
> The problem is that I need to use wait_event_timeout function
AFAIK you can't do that, it's just not the right tool for the job. You
can always use a single jiffy and be sure you will wait at least 20us,
or use usleep.
No matter how much you "need to use" your snowblower, it won't mow your
lawn.
--
Bill Davidsen <davidsen@tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-03-03 21:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-03 14:20 Question: 20 microseconds delay Mockern
2007-03-03 14:32 ` Jiri Slaby
2007-03-03 14:46 ` Mockern
2007-03-03 14:52 ` Jiri Slaby
2007-03-03 14:33 ` Hans-Jürgen Koch
2007-03-03 14:47 ` Mockern
2007-03-03 21:02 ` Bill Davidsen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.