'\" t .\" Title: usleep_range .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USLEEP_RANGE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usleep_range \- Sleep for an approximate time .SH "SYNOPSIS" .HP \w'void\ __sched\ usleep_range('u .BI "void __sched usleep_range(unsigned\ long\ " "min" ", unsigned\ long\ " "max" ");" .SH "ARGUMENTS" .PP \fImin\fR .RS 4 Minimum time in usecs to sleep .RE .PP \fImax\fR .RS 4 Maximum time in usecs to sleep .RE .SH "DESCRIPTION" .PP In non\-atomic context where the exact wakeup time is flexible, use \fBusleep_range\fR instead of \fBudelay\fR\&. The sleep improves responsiveness by avoiding the CPU\-hogging busy\-wait of \fBudelay\fR, 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\&. .SH "COPYRIGHT" .br