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... -- Mark Zealey (aka JALH on irc.openprojects.net: #zealos and many more) mark@zealos.org mark@itsolve.co.uk UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$ !E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---? !R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y-- (www.geekcode.com) - 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/