Files
haiku-beta6/headers/posix/poll.h
T

37 lines
919 B
C
Raw Normal View History

2002-10-28 18:46:30 +00:00
#ifndef _POLL_H
#define _POLL_H
/*
** Distributed under the terms of the OpenBeOS License.
*/
2002-07-09 12:24:59 +00:00
2002-10-28 18:46:30 +00:00
typedef unsigned long nfds_t;
2002-07-09 12:24:59 +00:00
struct pollfd {
int fd;
2002-10-28 18:46:30 +00:00
int events; /* events to look for */
2002-07-09 12:24:59 +00:00
int revents; /* events that occured */
};
2002-10-28 18:46:30 +00:00
/* events & revents */
#define POLLIN 0x0001 /* any readable data available */
#define POLLPRI 0x0002 /* high priority readable data */
#define POLLOUT 0x0004 /* file descriptor is writeable */
#define POLLRDNORM 0x0040 /* normal data available */
#define POLLRDBAND 0x0080 /* priority readable data */
#define POLLWRNORM POLLOUT
#define POLLWRBAND 0x0100 /* priority data can be written */
2002-07-09 12:24:59 +00:00
2002-10-28 18:46:30 +00:00
/* revents only */
#define POLLERR 0x0008 /* errors pending */
#define POLLHUP 0x0010 /* disconnected */
#define POLLNVAL 0x0020 /* invalid file descriptor */
extern
2002-10-26 13:22:40 +00:00
#ifdef __cplusplus
2002-10-28 18:46:30 +00:00
"C"
2002-10-26 13:22:40 +00:00
#endif
2002-10-28 18:46:30 +00:00
int poll(struct pollfd *fds, nfds_t numfds, int timeout);
2002-10-26 13:22:40 +00:00
2002-10-28 18:46:30 +00:00
#endif /* _POLL_H */