Re: udelay and nanosleep questions

From: Russell King (
Date: Sat Sep 21 2002 - 06:35:46 EST

On Sat, Sep 21, 2002 at 01:23:10PM +0200, Jos Hulzink wrote:
> 1) Can I rely on udelay(1) ? i.e. is the resolution high enough to wait at
> least 1 microsecond given it returns normally ? I know the actual
> implementation is platform / cpu dependant, so maybe I should ask: Should
> I be able to rely on udelay(1) ?

udelay() should (note: should) busy wait for at least the requested delay.
It may wait longer though.

Its behaviour in the presence of speedstep type technologies where cpufreq
is not in use is a little undefined; almost anything can happen. However,
with cpufreq in place, we adjust the delay value appropriately so that
a udelay() always sleeps for at least the requested time.

Russell King (                The developer of ARM Linux

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:33 EST