unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-2.0)
Page:
Section:
Apropos / Subsearch:
optional field

DELAY(9)                 BSD Kernel Developer's Manual                DELAY(9)

NAME
     delay, DELAY -- microsecond delay

SYNOPSIS
     #include <&lt;machine/param.h>&gt;

     void
     delay(unsigned int us);

     void
     DELAY(unsigned int us);

DESCRIPTION
     Wait approximately us microseconds.

     The delay is implemented as a machine loop, preventing events other than
     interrupt handlers for unmasked interrupts to run.  DELAY() is reentrant
     (doesn't modify any global kernel or machine state) and is safe to use in
     interrupt or process context.

     For long delays, tsleep(9) should be considered, however it can only be
     called from process context and its resolution is limited by the system
     clock frequency.

SEE ALSO
     hz(9), tsleep(9)

BSD                              May 23, 2002                              BSD