'\" t .\" Title: input_handler_for_each_handle .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Input Subsystem .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "INPUT_HANDLER_FOR_EA" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Input Subsystem" .\" ----------------------------------------------------------------- .\" * 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" input_handler_for_each_handle \- handle iterator .SH "SYNOPSIS" .HP \w'int\ input_handler_for_each_handle('u .BI "int input_handler_for_each_handle(struct\ input_handler\ *\ " "handler" ", void\ *\ " "data" ", int\ (*" "fn" ")\ (struct\ input_handle\ *,\ void\ *));" .SH "ARGUMENTS" .PP \fIhandler\fR .RS 4 input handler to iterate .RE .PP \fIdata\fR .RS 4 data for the callback .RE .PP \fIfn\fR .RS 4 function to be called for each handle .RE .SH "DESCRIPTION" .PP Iterate over \fIbus\fR\*(Aqs list of devices, and call \fIfn\fR for each, passing it \fIdata\fR and stop when \fIfn\fR returns a non\-zero value\&. The function is using RCU to traverse the list and therefore may be using in atomic contexts\&. The \fIfn\fR callback is invoked from RCU critical section and thus must not sleep\&. .SH "COPYRIGHT" .br