'\" t .\" Title: fence_wait_any_timeout .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "FENCE_WAIT_ANY_TIMEO" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * 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" fence_wait_any_timeout \- sleep until any fence gets signaled or until timeout elapses .SH "SYNOPSIS" .HP \w'signed\ long\ fence_wait_any_timeout('u .BI "signed long fence_wait_any_timeout(struct\ fence\ **\ " "fences" ", uint32_t\ " "count" ", bool\ " "intr" ", signed\ long\ " "timeout" ");" .SH "ARGUMENTS" .PP \fIfences\fR .RS 4 [in] array of fences to wait on .RE .PP \fIcount\fR .RS 4 [in] number of fences to wait on .RE .PP \fIintr\fR .RS 4 [in] if true, do an interruptible wait .RE .PP \fItimeout\fR .RS 4 [in] timeout value in jiffies, or MAX_SCHEDULE_TIMEOUT .RE .SH "DESCRIPTION" .PP Returns \-EINVAL on custom fence wait implementation, \-ERESTARTSYS if interrupted, 0 if the wait timed out, or the remaining timeout in jiffies on success\&. .PP Synchronous waits for the first fence in the array to be signaled\&. The caller needs to hold a reference to all fences in the array, otherwise a fence might be freed before return, resulting in undefined behavior\&. .SH "COPYRIGHT" .br