Re: Very Short Delays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Fri, Nov 02, 2001 at 12:26:18PM -0800, Christine Ames wrote:
>
> > Greetings,
> >
> > I'm looking for a way to "busy wait" <= 400 nanoseconds.
> >
> > In _Linux_Device_Drivers_ I've found udelay(for micro
> > seconds) and mdelay(for milli seconds), but they state (2nd
> > edition, page 189) that "Currently, support for delays longer
> > than a few microseconds and shorter than a timer tick is very
> > inefficient."  I found no further discussion.
> >
> > "Inefficient" or not, I need a cross-platform/cross-kernel
> > way to stall <= 400ns while my hardware gets back to me.  Am
> > I stuck, or is there a way?
>
> There's no way currently to do that, the best you can do is udelay(1),
which is
> 1ns. Any more, and you'll need to write your own function, based on
udelay, it's
> not *that* difficult, divide the magic constant by 2 to get roughly 550ns,
I'd
> think...

I thing you mean 1ms, not 1ns... or else it would just be udelay(400),
wouldn't it? ;)

Grs, Marc.



-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux