delay(D3DK) —
.IX \f4delay\fP(D3DK)
NAME
delay − delay process execution for a specified number of clock ticks
SYNOPSIS
void delay(long ticks);
ARGUMENTS
ticksThe number of clock ticks to delay.
DESCRIPTION
delay causes the caller to sleep for the amount of time specified by ticks, which is in units of clock ticks. The exact length of the delay is not guaranteed but it will not be less than ticks clock ticks. The length of a clock tick can vary across different implementations and therefore drivers should not include any hard-coded assumptions about the length of a tick. The drv_usectohz(D3DK) and drv_hztousec(D3DK) functions can be used, as necessary, to convert between clock ticks and microseconds (implementation independent units).
The delay function calls itimeout(D3DK) to schedule a wakeup after the specified amount of time has elapsed. delay then goes to sleep until itimeout wakes up the sleeping process.
RETURN VALUE
None.
LEVEL
Base Only.
NOTES
Function sleeps.
Driver-defined basic locks and read/write locks may not be held across calls to this function.
Driver-defined sleep locks may be held across calls to this function, but this is discouraged because it can adversely affect performance by forcing any other processes contending for the lock to sleep for the duration of the delay.
SEE ALSO
drv_hztousec(D3DK), drv_usectohz(D3DK), drv_usecwait(D3DK), itimeout(D3DK), untimeout(D3DK)
DDI/DKI