delay(D3) delay(D3)
NAME
delay - delay process execution for a specified number of
clock ticks
SYNOPSIS
void delay(long ticks);
Arguments
ticks The 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 -1 clock ticks.
Return Values
None
USAGE
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(D3) and drv_hztousec(D3) functions can be used,
as necessary, to convert between clock ticks and microseconds
(implementation independent units).
The delay function calls timeout(D3) [or, for multithreaded
drivers, itimeout(D3)] to schedule a wakeup after the
specified amount of time has elapsed. delay then goes to
sleep until timeout (or itimeout) wakes up the sleeping
process.
Level
Base only.
Synchronization Constraints
Can sleep.
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.
Copyright 1994 Novell, Inc. Page 1
delay(D3) delay(D3)
REFERENCES
drv_hztousec(D3), drv_usectohz(D3), drv_usecwait(D3),
itimeout(D3), sleep(D3), timeout(D3), untimeout(D3),
wakeup(D3)
NOTICES
Portability
All processors
Applicability
ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2