Messages in this thread | | | Date | Sat, 21 Sep 2002 12:35:46 +0100 | From | Russell King <> | Subject | Re: udelay and nanosleep questions |
| |
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 (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
- 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/
| |