Subject: delay() or DELAY()
To: None <>
From: Gregory McGarry <>
List: tech-kern
Date: 05/23/2002 13:54:29
Having delay(9) would be nice.  Here are some observations:

(1) delay() and DELAY() are defined in <machine/param.h>, except
    for i386 which puts them in <machine/cpu.h>

(2) all ports use a 32-bit argument (mixture of signed/unsigned),
    except alpha which uses an unsigned 64-bit argument

(3) mips ports use DELAY() as a macro and delay() a function
    around it, except for cobalt and sgimips with inline

(4) DELAY() for arc doesn't match the other mips ports

(5) for most other ports, delay() and DELAY() are equivalent

(6) MI drivers use delay() or DELAY() interchangably

(7) i386 actually states in cpu.h that DELAY() is the MI
    interface and therefore infers that delay() should be for
    MD use only

Of these observations, I think (1) should be fixed.  (2) should
made consistent within the restrictions of CPU and timing
hardware.  If (7) is true then the others are easily fixed.

	-- Gregory McGarry <>