Re: mdelay() implementation patch

Paul Gortmaker (
Sat, 23 May 1998 01:54:47 +1000 (EST)

> > > > (b) when >1000, replace each occurence with:
> > > > {unsigned int msec = XXXX; while (--msec) udelay(1000);}
> > > > (c) indroduce a "mdelay()" that does (b)


> What is the semantic difference between mdelay and udelay? I mean, why
> don't you just change the implementation of udelay to handle longer
> delays using __builtin_constant_p et al? Having both mdelay and udelay
> is confusing.

I'd say it reduces confusion and makes the source more readable. For
example, consider the two functionally equivalent calls:


and then tell me that you don't have to count the zeros in the former
after staring at a terminal for a few hours. (Yes, you could use
1000*1000 to improve readability instead, if you were so inclined...)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to