Skip to content

Commit 65aaf87

Browse files
author
Al Viro
committed
add EPOLLNVAL, annotate EPOLL... and event_poll->event
Signed-off-by: Al Viro <[email protected]>
1 parent cfe3944 commit 65aaf87

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

include/uapi/linux/eventpoll.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@
2828
#define EPOLL_CTL_MOD 3
2929

3030
/* Epoll event masks */
31-
#define EPOLLIN 0x00000001
32-
#define EPOLLPRI 0x00000002
33-
#define EPOLLOUT 0x00000004
34-
#define EPOLLERR 0x00000008
35-
#define EPOLLHUP 0x00000010
36-
#define EPOLLRDNORM 0x00000040
37-
#define EPOLLRDBAND 0x00000080
38-
#define EPOLLWRNORM 0x00000100
39-
#define EPOLLWRBAND 0x00000200
40-
#define EPOLLMSG 0x00000400
41-
#define EPOLLRDHUP 0x00002000
31+
#define EPOLLIN (__force __poll_t)0x00000001
32+
#define EPOLLPRI (__force __poll_t)0x00000002
33+
#define EPOLLOUT (__force __poll_t)0x00000004
34+
#define EPOLLERR (__force __poll_t)0x00000008
35+
#define EPOLLHUP (__force __poll_t)0x00000010
36+
#define EPOLLNVAL (__force __poll_t)0x00000020
37+
#define EPOLLRDNORM (__force __poll_t)0x00000040
38+
#define EPOLLRDBAND (__force __poll_t)0x00000080
39+
#define EPOLLWRNORM (__force __poll_t)0x00000100
40+
#define EPOLLWRBAND (__force __poll_t)0x00000200
41+
#define EPOLLMSG (__force __poll_t)0x00000400
42+
#define EPOLLRDHUP (__force __poll_t)0x00002000
4243

4344
/* Set exclusive wakeup mode for the target file descriptor */
44-
#define EPOLLEXCLUSIVE (1U << 28)
45+
#define EPOLLEXCLUSIVE (__force __poll_t)(1U << 28)
4546

4647
/*
4748
* Request the handling of system wakeup events so as to prevent system suspends
@@ -53,13 +54,13 @@
5354
*
5455
* Requires CAP_BLOCK_SUSPEND
5556
*/
56-
#define EPOLLWAKEUP (1U << 29)
57+
#define EPOLLWAKEUP (__force __poll_t)(1U << 29)
5758

5859
/* Set the One Shot behaviour for the target file descriptor */
59-
#define EPOLLONESHOT (1U << 30)
60+
#define EPOLLONESHOT (__force __poll_t)(1U << 30)
6061

6162
/* Set the Edge Triggered behaviour for the target file descriptor */
62-
#define EPOLLET (1U << 31)
63+
#define EPOLLET (__force __poll_t)(1U << 31)
6364

6465
/*
6566
* On x86-64 make the 64bit structure have the same alignment as the
@@ -74,7 +75,7 @@
7475
#endif
7576

7677
struct epoll_event {
77-
__u32 events;
78+
__poll_t events;
7879
__u64 data;
7980
} EPOLL_PACKED;
8081

0 commit comments

Comments
 (0)