eventpoll: add epoll_pwait3()
This adds epoll_pwait3(), which add a min_wait_ts argument. As we're
already at the max for how many arguments epoll_pwait2() uses, we wrap
a number of the arguments in struct epoll_pwait_data:
struct epoll_pwait_data {
struct __kernel_timespec timeout;
__u32 min_wait_ts;
__u32 sigmask_sz;
__u64 unused[2];
sigset_t sigmask;
};
and define a set of flags to tell the kernel which members are populated:
The application may then pass in any combination of these flags, if it
wishes to use timeouts, min_wait_ts, or a sigmask. The struct has two
64-bit values unused and the syscall checks for valid flags, so this can
be extended in the future.
epoll_pwait3() is defined as follows:
sys_epoll_pwait3(int epfd, struct epoll_event __user *events,
int maxevents, int flags,
struct epoll_pwait_data __user *data);
If 'flags' is 0, then 'data' may also be zero and hence need not be
passed in at all.
Signed-off-by: Jens Axboe <axboe@kernel.dk>