aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavide Libenzi <davidel@xmailserver.org>2006-10-11 04:21:44 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:21 -0400
commitb611967de4dc5c52049676c4369dcac622a7cdfe (patch)
tree8c19038c8bbaa4851dcb99bed33707deaf5170d1 /include
parent0f836e5fecf59d0d0353e9af11fd14a32a3001ae (diff)
[PATCH] epoll_pwait()
Implement 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 Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Andi Kleen <ak@muc.de> Cc: Michael Kerrisk <mtk-manpages@gmx.net> Cc: Ulrich Drepper <drepper@redhat.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/unistd.h3
-rw-r--r--include/linux/syscalls.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index 3ca7ab963d7d..beeeaf6b054a 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -324,10 +324,11 @@
324#define __NR_vmsplice 316 324#define __NR_vmsplice 316
325#define __NR_move_pages 317 325#define __NR_move_pages 317
326#define __NR_getcpu 318 326#define __NR_getcpu 318
327#define __NR_epoll_pwait 319
327 328
328#ifdef __KERNEL__ 329#ifdef __KERNEL__
329 330
330#define NR_syscalls 319 331#define NR_syscalls 320
331#include <linux/err.h> 332#include <linux/err.h>
332 333
333/* 334/*
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index b0ace3fd7eb9..1912c6cbef55 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -431,6 +431,10 @@ asmlinkage long sys_epoll_ctl(int epfd, int op, int fd,
431 struct epoll_event __user *event); 431 struct epoll_event __user *event);
432asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events, 432asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events,
433 int maxevents, int timeout); 433 int maxevents, int timeout);
434asmlinkage long sys_epoll_pwait(int epfd, struct epoll_event __user *events,
435 int maxevents, int timeout,
436 const sigset_t __user *sigmask,
437 size_t sigsetsize);
434asmlinkage long sys_gethostname(char __user *name, int len); 438asmlinkage long sys_gethostname(char __user *name, int len);
435asmlinkage long sys_sethostname(char __user *name, int len); 439asmlinkage long sys_sethostname(char __user *name, int len);
436asmlinkage long sys_setdomainname(char __user *name, int len); 440asmlinkage long sys_setdomainname(char __user *name, int len);