1<poll.h>(0P) POSIX Programmer's Manual <poll.h>(0P)
2
3
4
6 poll.h - definitions for the poll() function
7
9 #include <poll.h>
10
12 The <poll.h> header shall define the pollfd structure that includes at
13 least the following members:
14
15
16 int fd The following descriptor being polled.
17 short events The input event flags (see below).
18 short revents The output event flags (see below).
19
20 The <poll.h> header shall define the following type through typedef:
21
22 nfds_t An unsigned integer type used for the number of file descripâ
23 tors.
24
25
26 The implementation shall support one or more programming environments
27 in which the width of nfds_t is no greater than the width of type long.
28 The names of these programming environments can be obtained using the
29 confstr() function or the getconf utility.
30
31 The following symbolic constants shall be defined, zero or more of
32 which may be OR'ed together to form the events or revents members in
33 the pollfd structure:
34
35 POLLIN Data other than high-priority data may be read without blocking.
36
37 POLLRDNORM
38 Normal data may be read without blocking.
39
40 POLLRDBAND
41 Priority data may be read without blocking.
42
43 POLLPRI
44 High priority data may be read without blocking.
45
46 POLLOUT
47 Normal data may be written without blocking.
48
49 POLLWRNORM
50 Equivalent to POLLOUT.
51
52 POLLWRBAND
53 Priority data may be written.
54
55 POLLERR
56 An error has occurred ( revents only).
57
58 POLLHUP
59 Device has been disconnected ( revents only).
60
61 POLLNVAL
62 Invalid fd member ( revents only).
63
64
65 The significance and semantics of normal, priority, and high-priority
66 data are file and device-specific.
67
68 The following shall be declared as a function and may also be defined
69 as a macro. A function prototype shall be provided.
70
71
72 int poll(struct pollfd[], nfds_t, int);
73
74 The following sections are informative.
75
77 None.
78
80 None.
81
83 None.
84
86 The System Interfaces volume of IEEE Std 1003.1-2001, confstr(),
87 poll(), the Shell and Utilities volume of IEEE Std 1003.1-2001, getconf
88
90 Portions of this text are reprinted and reproduced in electronic form
91 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
92 -- Portable Operating System Interface (POSIX), The Open Group Base
93 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
94 Electrical and Electronics Engineers, Inc and The Open Group. In the
95 event of any discrepancy between this version and the original IEEE and
96 The Open Group Standard, the original IEEE and The Open Group Standard
97 is the referee document. The original Standard can be obtained online
98 at http://www.opengroup.org/unix/online.html .
99
100
101
102IEEE/The Open Group 2003 <poll.h>(0P)