2 .\" Copyright (c) 2003, Sun Microsystems, Inc., All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LDI_POLL 9F "Jun 3, 2003"
8 ldi_poll \- Poll a device
12 #include <sys/sunldi.h>
16 \fBint\fR \fBldi_poll\fR(\fBldi_handle_t\fR \fIlh\fR, \fBshort\fR \fIevents\fR, \fBint\fR \fIanyyet\fR, \fBshort *\fR\fIreventsp\fR,
17 \fBstruct pollhead **\fR\fIphpp\fR);
36 Potential events. Valid events are:
43 Data other than high priority data may be read without blocking.
52 Normal data may be written without blocking.
61 High priority data may be received without blocking.
70 Device hangup has occurred.
79 An error has occurred on the device.
88 Normal data (priority band = 0) may be read without blocking.
97 Data from a non-zero priority band may be read without blocking.
106 Data other than high priority data may be read without blocking.
115 Priority data (priority band > 0) may be written.
126 A flag that is non-zero if any other file descriptors in the
127 pollfd array have events pending. The \fBpoll\fR(2) system call takes a pointer
128 to an array of pollfd structures as one of its arguments. See
129 \fBpoll\fR(2) for more details.
135 \fB\fIreventsp\fR \fR
138 Pointer to a bitmask of the returned events satisfied.
147 Pointer to a pointer to a pollhead structure.
153 The \fBldi_poll()\fR function passes a poll request to the device entry point
154 for the device specified by the layered handle. This operation is supported for
155 block, character, and streams devices.
159 The \fBldi_poll()\fR function returns \fB0\fR upon success. If a failure occurs
160 before the request is passed on to the device, possible return values are:
167 Invalid input parameters.
176 Operation is not supported for this device.
182 These functions may be called from user or kernel context.