1ldi_poll(9F) Kernel Functions for Drivers ldi_poll(9F)
2
3
4
6 ldi_poll - Poll a device
7
9 #include <sys/sunldi.h>
10
11
12
13 int ldi_poll(ldi_handle_t lh, short events, int anyyet, short *reventsp,
14 struct pollhead **phpp);
15
16
18 lh Layered handle.
19
20
21 events Potential events. Valid events are:
22
23 POLLIN Data other than high priority data may be
24 read without blocking.
25
26
27 POLLOUT Normal data may be written without blocking.
28
29
30 POLLPRI High priority data may be received without
31 blocking.
32
33
34 POLLHUP Device hangup has occurred.
35
36
37 POLLERR An error has occurred on the device.
38
39
40 POLLRDNORM Normal data (priority band = 0) may be read
41 without blocking.
42
43
44 POLLRDBAND Data from a non-zero priority band may be
45 read without blocking.
46
47
48 POLLWRNORM Data other than high priority data may be
49 read without blocking.
50
51
52 POLLWRBAND Priority data (priority band > 0) may be
53 written.
54
55
56
57 anyyet A flag that is non-zero if any other file descriptors
58 in the pollfd array have events pending. The poll(2) sys‐
59 tem call takes a pointer to an array of pollfd
60 structures as one of its arguments. See poll(2) for more
61 details.
62
63
64 reventsp Pointer to a bitmask of the returned events satisfied.
65
66
67 phpp Pointer to a pointer to a pollhead structure.
68
69
71 The ldi_poll() function passes a poll request to the device entry point
72 for the device specified by the layered handle. This operation is sup‐
73 ported for block, character, and streams devices.
74
76 The ldi_poll() function returns 0 upon success. If a failure occurs
77 before the request is passed on to the device, possible return values
78 are:
79
80 EINVAL Invalid input parameters.
81
82
83 ENOTSUP Operation is not supported for this device.
84
85
87 These functions may be called from user or kernel context.
88
89
90
91SunOS 5.11 3 June 2003 ldi_poll(9F)