'\" t .\" Title: schedule_hrtimeout .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SCHEDULE_HRTIMEOUT" "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 \- sleep until timeout .SH "SYNOPSIS" .HP \w'int\ __sched\ schedule_hrtimeout('u .BI "int __sched schedule_hrtimeout(ktime_t\ *\ " "expires" ", const\ enum\ hrtimer_mode\ " "mode" ");" .SH "ARGUMENTS" .PP \fIexpires\fR .RS 4 timeout value (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 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