busy-wait for specified interval
void drv_usecwait(clock_t microsecs);
drv_usecwait causes the caller
to busy-wait for at least the number of microseconds
specified by microsecs.
The amount of time spent busy-waiting
may be greater than the time specified
by microsecs but will not be less.
The number of microseconds to busy-wait.
drv_usecwait should only be used to wait for short periods of time
(less than a clock tick) or when it is necessary to wait without sleeping
(for example, at interrupt level).
When the desired delay is at least as long as clock tick and it is possible
to sleep, the
function should be used instead since it
will not waste processor time busy-waiting as drv_usecwait does.
Because excessive busy-waiting is wasteful the driver should only
make calls to drv_usecwait as needed, and only for as much time as
drv_usecwait does not raise the interrupt priority level;
if the driver wishes to block interrupts for the duration of the wait,
it is the driver's responsibility to set the priority level before the call
and restore it to its original value afterward.
Context and synchronization
Busy-waiting can increase the preemption latency
experienced by high priority processes.
Since short and bounded preemption latency
can be critical in a real time environment,
drivers intended for use in such an environment
should not use this function
or should limit the length of the wait
to an appropriately short length of time.
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
SCO OpenServer ODDI compatibility
ODDI drivers use the
function in place of
``Delays and busy-waits'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005