usleep_range(9) - phpMan
USLEEP_RANGE(9) Driver Basics USLEEP_RANGE(9)
NAME
usleep_range - Sleep for an approximate time
SYNOPSIS
void __sched usleep_range(unsigned long min, unsigned long max);
ARGUMENTS
min
Minimum 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
Kernel Hackers Manual 4.8. January 2017 USLEEP_RANGE(9)
|