• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef	_POLL_H
2 #define	_POLL_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <features.h>
9 
10 #include <bits/poll.h>
11 
12 #define POLLIN     0x001
13 #define POLLPRI    0x002
14 #define POLLOUT    0x004
15 #define POLLERR    0x008
16 #define POLLHUP    0x010
17 #define POLLNVAL   0x020
18 #define POLLRDNORM 0x040
19 #define POLLRDBAND 0x080
20 #ifndef POLLWRNORM
21 #define POLLWRNORM 0x100
22 #define POLLWRBAND 0x200
23 #endif
24 #ifndef POLLMSG
25 #define POLLMSG    0x400
26 #define POLLRDHUP  0x2000
27 #endif
28 
29 #ifdef __LITEOS__
30 typedef unsigned int pollevent_t;
31 #endif
32 typedef unsigned long nfds_t;
33 
34 struct pollfd {
35 	int fd;
36 	short events;
37 	short revents;
38 };
39 
40 int poll (struct pollfd *, nfds_t, int);
41 
42 #ifdef _GNU_SOURCE
43 #define __NEED_time_t
44 #define __NEED_struct_timespec
45 #define __NEED_sigset_t
46 #include <bits/alltypes.h>
47 int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
48 #endif
49 
50 #if _REDIR_TIME64
51 #ifdef _GNU_SOURCE
52 __REDIR(ppoll, __ppoll_time64);
53 #endif
54 #endif
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif
61