table of contents
other versions
USLEEP_RANGE(9) | Driver Basics | USLEEP_RANGE(9) |
NAME¶
usleep_range - Sleep for an approximate timeSYNOPSIS¶
void __sched
usleep_range(unsigned long min,
unsigned long max);
ARGUMENTS¶
minMinimum time in usecs to sleep
max
Maximum time in usecs to sleep
DESCRIPTION¶
In non-atomic context where the exact wakeup time is flexible, use usleep_range instead of udelay. The sleep improves responsiveness by avoiding the CPU-hogging busy-wait of udelay, and the range reduces power usage by allowing hrtimers to take advantage of an already- scheduled interrupt instead of scheduling a new one just for this sleep.COPYRIGHT¶
January 2017 | Kernel Hackers Manual 4.8. |