The attached patch implements the epoll_pwait system call, that extend the event wait mechanism with the same logic ppoll and pselect do. The definition of epoll_pwait is: int epoll_pwait(int epfd, struct epoll_event *events, int maxevents, int timeout, const sigset_t *sigmask, size_t sigsetsize); The difference between the vanilla epoll_wait and epoll_pwait is that the latter allows the caller to specify a signal mask to be set while waiting for events. Hence epoll_pwait will wait until either one monitored event, or an unmasked signal happen. If sigmask is NULL, the epoll_pwait system call will act exactly like epoll_wait. For the POSIX definition of pselect, information is available here: http://www.opengroup.org/onlinepubs/009695399/functions/select.html This patch goes over 2.6.15-mm4 and the epoll_pwait definition depends on the TIF_RESTORE_SIGMASK bits. ChangeLog: o Make it conditional to TIF_RESTORE_SIGMASK definition to avoid breaking archs that do not still support it o Changed the name to epoll_pwait o Changed the order of "sigmask" and "error" checks in the epoll_pwait exit path Singed-off-by: Davide Libenzi - Davide arch/i386/kernel/syscall_table.S | 1 fs/eventpoll.c | 55 ++++++++++++++++++++++++++++++++++++--- include/asm-i386/unistd.h | 3 +- include/linux/syscalls.h | 3 ++ 4 files changed, 58 insertions(+), 4 deletions(-)