2 * Copyright 2002-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
9 typedef unsigned long nfds_t
;
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 */
27 #define POLLERR 0x0004 /* errors pending */
28 #define POLLHUP 0x0080 /* disconnected */
29 #define POLLNVAL 0x1000 /* invalid file descriptor */
36 int poll(struct pollfd
*fds
, nfds_t numfds
, int timeout
);