Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _POLL_H |
2 | #define _POLL_H | ||||
3 | |||||
4 | #ifdef __cplusplus | ||||
5 | extern "C" { | ||||
6 | #endif | ||||
7 | |||||
8 | #define POLLIN 0x001 | ||||
9 | #define POLLPRI 0x002 | ||||
10 | #define POLLOUT 0x004 | ||||
11 | #define POLLERR 0x008 | ||||
12 | #define POLLHUP 0x010 | ||||
13 | #define POLLNVAL 0x020 | ||||
14 | #define POLLRDNORM 0x040 | ||||
15 | #define POLLRDBAND 0x080 | ||||
16 | #define POLLWRNORM 0x100 | ||||
17 | #define POLLWRBAND 0x200 | ||||
18 | #define POLLMSG 0x400 | ||||
19 | |||||
Rich Felker | 3f62f76 | 2012-09-01 00:20:24 -0400 | [diff] [blame] | 20 | typedef unsigned long nfds_t; |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 21 | |
22 | struct pollfd | ||||
23 | { | ||||
24 | int fd; | ||||
25 | short events; | ||||
26 | short revents; | ||||
27 | }; | ||||
28 | |||||
29 | int poll (struct pollfd *, nfds_t, int); | ||||
30 | |||||
31 | #ifdef __cplusplus | ||||
32 | } | ||||
33 | #endif | ||||
34 | |||||
35 | #endif |