1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man9f / ldi_poll.9f
blob97b61dac1f379e85feefc1b30cff9c7b37e4019b
1 '\" te
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"
7 .SH NAME
8 ldi_poll \- Poll a device
9 .SH SYNOPSIS
10 .LP
11 .nf
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);
18 .fi
20 .SH PARAMETERS
21 .sp
22 .ne 2
23 .na
24 \fB\fIlh\fR \fR
25 .ad
26 .RS 13n
27 Layered handle.
28 .RE
30 .sp
31 .ne 2
32 .na
33 \fB\fIevents\fR \fR
34 .ad
35 .RS 13n
36 Potential events. Valid events are:
37 .sp
38 .ne 2
39 .na
40 \fBPOLLIN\fR
41 .ad
42 .RS 14n
43 Data other than high priority data may be read without blocking.
44 .RE
46 .sp
47 .ne 2
48 .na
49 \fBPOLLOUT\fR
50 .ad
51 .RS 14n
52 Normal data may be written without blocking.
53 .RE
55 .sp
56 .ne 2
57 .na
58 \fBPOLLPRI\fR
59 .ad
60 .RS 14n
61 High priority data may be received without blocking.
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fBPOLLHUP\fR
68 .ad
69 .RS 14n
70 Device hangup has occurred.
71 .RE
73 .sp
74 .ne 2
75 .na
76 \fBPOLLERR\fR
77 .ad
78 .RS 14n
79 An error has occurred on the device.
80 .RE
82 .sp
83 .ne 2
84 .na
85 \fBPOLLRDNORM\fR
86 .ad
87 .RS 14n
88 Normal data (priority band = 0) may be read without blocking.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fBPOLLRDBAND\fR
95 .ad
96 .RS 14n
97 Data from a non-zero priority band may be read without blocking.
98 .RE
101 .ne 2
103 \fBPOLLWRNORM\fR
105 .RS 14n
106 Data other than high priority data may be read without blocking.
110 .ne 2
112 \fBPOLLWRBAND\fR
114 .RS 14n
115 Priority data (priority band > 0) may be written.
121 .ne 2
123 \fB\fIanyyet\fR\fR
125 .RS 13n
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.
133 .ne 2
135 \fB\fIreventsp\fR \fR
137 .RS 13n
138 Pointer to a bitmask of the returned events satisfied.
142 .ne 2
144 \fB\fIphpp\fR \fR
146 .RS 13n
147 Pointer to a pointer to a pollhead structure.
150 .SH DESCRIPTION
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.
156 .SH RETURN VALUES
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:
162 .ne 2
164 \fBEINVAL\fR
166 .RS 11n
167 Invalid input parameters.
171 .ne 2
173 \fBENOTSUP\fR
175 .RS 11n
176 Operation is not supported for this device.
179 .SH CONTEXT
182 These functions may be called from user or kernel context.