'\" t .\" Title: schedule_hrtimeout_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 "SCHEDULE_HRTIMEOUT_R" "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" schedule_hrtimeout_range \- sleep until timeout .SH "SYNOPSIS" .HP \w'int\ __sched\ schedule_hrtimeout_range('u .BI "int __sched schedule_hrtimeout_range(ktime_t\ *\ " "expires" ", u64\ " "delta" ", const\ enum\ hrtimer_mode\ " "mode" ");" .SH "ARGUMENTS" .PP \fIexpires\fR .RS 4 timeout value (ktime_t) .RE .PP \fIdelta\fR .RS 4 slack in expires timeout (ktime_t) .RE .PP \fImode\fR .RS 4 timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL .RE .SH "DESCRIPTION" .PP Make the current task sleep until the given expiry time has elapsed\&. The routine will return immediately unless the current task state has been set (see \fBset_current_state\fR)\&. .PP The \fIdelta\fR argument gives the kernel the freedom to schedule the actual wakeup to a time that is both power and performance friendly\&. The kernel give the normal best effort behavior for \(lq\fIexpires\fR+\fIdelta\fR\(rq, but may decide to fire the timer earlier, but no earlier than \fIexpires\fR\&. .PP You can set the task state as follows \- .PP \fBTASK_UNINTERRUPTIBLE\fR \- at least \fItimeout\fR time is guaranteed to pass before the routine returns\&. .PP \fBTASK_INTERRUPTIBLE\fR \- the routine may return early if a signal is delivered to the current task\&. .PP The current task state is guaranteed to be TASK_RUNNING when this routine returns\&. .PP Returns 0 when the timer has expired otherwise \-EINTR .SH "COPYRIGHT" .br