Query: drv_usecwait
OS: opensolaris
Section: 9f
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
drv_usecwait(9F) Kernel Functions for Drivers drv_usecwait(9F)NAMEdrv_usecwait - busy-wait for specified intervalSYNOPSIS#include <sys/types.h> #include <sys/ddi.h> void drv_usecwait(clock_t microsecs);INTERFACE LEVELArchitecture independent level 1 (DDI/DKI).PARAMETERSmicrosecs The number of microseconds to busy-wait.DESCRIPTIONThe drv_usecwait() function gives drivers a means of busy-waiting for a specified microsecond count. The amount of time spent busy-waiting may be greater than the microsecond count but will minimally be the number of microseconds specified. delay(9F) can be used by a driver to delay for a specified number of system ticks, but it has two limitations. First, the granularity of the wait time is limited to one clock tick, which may be more time than is needed for the delay. Second, delay(9F) can be invoked from user or kernel context and hence cannot be used at interrupt time or system initialization. Often, drivers need to delay for only a few microseconds, waiting for a write to a device register to be picked up by the device. In this case, even in user context, delay(9F) produces too long a wait period.CONTEXTThe drv_usecwait() function can be called from user, interrupt, or kernel context.SEE ALSOdelay(9F), timeout(9F), untimeout(9F) Writing Device DriversNOTESThe driver wastes processor time by making this call since drv_usecwait() does not block but simply busy-waits. The driver should only make calls to drv_usecwait() as needed, and only for as much time as needed. The drv_usecwait() function does not mask out interrupts. SunOS 5.11 16 Jan 2006 drv_usecwait(9F)
Related Man Pages |
---|
delay(9f) - opensolaris |
timeout(9f) - opensolaris |
delay(9f) - php |
delay(9f) - mojave |
delay(9f) - posix |
Similar Topics in the Unix Linux Community |
---|
Reduce boot-time delay on FreeBSD? |
system disks on aix 5.3 |
CIO/DIO and JFS2 read ahead |
how to write a script to let cpu busy? |
Need to know %age disk busy on AIX |