'\" t .\" Title: wait_event_interruptible_lock_irq_timeout .\" 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 "WAIT_EVENT_INTERRUPT" "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" wait_event_interruptible_lock_irq_timeout \- sleep until a condition gets true or a timeout elapses\&. The condition is checked under the lock\&. This is expected to be called with the lock taken\&. .SH "SYNOPSIS" .HP \w'wait_event_interruptible_lock_irq_timeout('u .BI "wait_event_interruptible_lock_irq_timeout(" "wq" ", " "condition" ", " "lock" ", " "timeout" ");" .SH "ARGUMENTS" .PP \fIwq\fR .RS 4 the waitqueue to wait on .RE .PP \fIcondition\fR .RS 4 a C expression for the event to wait for .RE .PP \fIlock\fR .RS 4 a locked spinlock_t, which will be released before \fBschedule\fR and reacquired afterwards\&. .RE .PP \fItimeout\fR .RS 4 timeout, in jiffies .RE .SH "DESCRIPTION" .PP The process is put to sleep (TASK_INTERRUPTIBLE) until the \fIcondition\fR evaluates to true or signal is received\&. The \fIcondition\fR is checked each time the waitqueue \fIwq\fR is woken up\&. .PP \fBwake_up\fR has to be called after changing any variable that could change the result of the wait condition\&. .PP This is supposed to be called while holding the lock\&. The lock is dropped before going to sleep and is reacquired afterwards\&. .PP The function returns 0 if the \fItimeout\fR elapsed, \-ERESTARTSYS if it was interrupted by a signal, and the remaining jiffies otherwise if the condition evaluated to true before the timeout elapsed\&. .SH "COPYRIGHT" .br