add preadv/pwritev syscall wrappers
[musl] / include / poll.h
1 #ifndef _POLL_H
2 #define _POLL_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <features.h>
9
10 #define POLLIN     0x001
11 #define POLLPRI    0x002
12 #define POLLOUT    0x004
13 #define POLLERR    0x008
14 #define POLLHUP    0x010
15 #define POLLNVAL   0x020
16 #define POLLRDNORM 0x040
17 #define POLLRDBAND 0x080
18 #define POLLWRNORM 0x100
19 #define POLLWRBAND 0x200
20 #define POLLMSG    0x400
21
22 typedef unsigned long nfds_t;
23
24 struct pollfd
25 {
26         int fd;
27         short events;
28         short revents;
29 };
30
31 int poll (struct pollfd *, nfds_t, int);
32
33 #ifdef _GNU_SOURCE
34 #define __NEED_time_t
35 #define __NEED_struct_timespec
36 #define __NEED_sigset_t
37 #include <bits/alltypes.h>
38 int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
39 #endif
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif