34 lines
531 B
C
34 lines
531 B
C
#ifndef SYS_LINUX_POLL_H_
|
|
#define SYS_LINUX_POLL_H_
|
|
|
|
#define POLLIN 0x1
|
|
#define POLLPRI 0x2
|
|
#define POLLOUT 0x4
|
|
#define POLLERR 0x8
|
|
#define POLLHUP 0x10
|
|
#define POLLNVAL 0x20
|
|
#define POLLRDNORM 0x40
|
|
#define POLLRDBAND 0x80
|
|
#define POLLWRNORM 0x100
|
|
#define POLLWRBAND 0x200
|
|
|
|
#if defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef unsigned long long nfds_t;
|
|
|
|
struct pollfd {
|
|
int fd;
|
|
short events;
|
|
short revents;
|
|
};
|
|
|
|
extern int poll(struct pollfd *fds, nfds_t nfds, int timeout);
|
|
|
|
#if defined(__cplusplus)
|
|
}
|
|
#endif
|
|
|
|
#endif
|