2
* upoll.h -- $Id: upoll.h 685 2003-03-08 15:26:51Z travo $
4
* UNIX poll.h header, when poll() must be implemented using select
6
* Copyright (c) 1998. See accompanying LEGAL file for details.
10
int fd; /* file descriptor */
11
short events; /* events desired */
12
short revents; /* events returned */
15
/* events or revents */
16
#define POLLIN 01 /* ready to read */
17
#define POLLPRI 02 /* urgently ready to read */
18
#define POLLOUT 04 /* fd is writable */
21
#define POLLERR 010 /* error */
22
#define POLLHUP 020 /* hangup */
23
#define POLLNVAL 040 /* fd not open */
25
/* timeout is in milliseconds, -1 to wait forever
26
* returns number of fds with non-zero revents,
27
* or -1 and sets errno to
28
* EAGAIN, EFAULT, EINTR (signal during poll), EINVAL */
29
extern int u__poll(struct pollfd *fds, unsigned long int nfds, int timeout);