Make UEFI boot-platform build again
[haiku.git] / headers / posix / poll.h
blob8935f66fae681eae5974009d94b5beca94038e10
1 /*
2 * Copyright 2002-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _POLL_H
6 #define _POLL_H
9 typedef unsigned long nfds_t;
11 struct pollfd {
12 int fd;
13 short events; /* events to look for */
14 short revents; /* events that occured */
17 /* events & revents - compatible with the B_SELECT_xxx definitions in Drivers.h */
18 #define POLLIN 0x0001 /* any readable data available */
19 #define POLLOUT 0x0002 /* file descriptor is writeable */
20 #define POLLRDNORM POLLIN
21 #define POLLWRNORM POLLOUT
22 #define POLLRDBAND 0x0008 /* priority readable data */
23 #define POLLWRBAND 0x0010 /* priority data can be written */
24 #define POLLPRI 0x0020 /* high priority readable data */
26 /* revents only */
27 #define POLLERR 0x0004 /* errors pending */
28 #define POLLHUP 0x0080 /* disconnected */
29 #define POLLNVAL 0x1000 /* invalid file descriptor */
32 extern
33 #ifdef __cplusplus
34 "C"
35 #endif
36 int poll(struct pollfd *fds, nfds_t numfds, int timeout);
38 #endif /* _POLL_H */