summaryrefslogtreecommitdiffstats
path: root/kernel/sys_ni.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-02 19:51:00 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-02 19:57:24 +0200
commit7a074e96dee62586c935c80cecd931431bfdd0be (patch)
treea1a29dad896070e82827d7447cfcc9a064e5a63d /kernel/sys_ni.c
parentaio: implement IOCB_CMD_FSYNC and IOCB_CMD_FDSYNC (diff)
downloadlinux-7a074e96dee62586c935c80cecd931431bfdd0be.tar.xz
linux-7a074e96dee62586c935c80cecd931431bfdd0be.zip
aio: implement io_pgetevents
This is the io_getevents equivalent of ppoll/pselect and allows to properly mix signals and aio completions (especially with IOCB_CMD_POLL) and atomically executes the following sequence: sigset_t origmask; pthread_sigmask(SIG_SETMASK, &sigmask, &origmask); ret = io_getevents(ctx, min_nr, nr, events, timeout); pthread_sigmask(SIG_SETMASK, &origmask, NULL); Note that unlike many other signal related calls we do not pass a sigmask size, as that would get us to 7 arguments, which aren't easily supported by the syscall infrastructure. It seems a lot less painful to just add a new syscall variant in the unlikely case we're going to increase the sigset size. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'kernel/sys_ni.c')
-rw-r--r--kernel/sys_ni.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 9791364925dc..183169c2a75b 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -43,7 +43,9 @@ COND_SYSCALL(io_submit);
COND_SYSCALL_COMPAT(io_submit);
COND_SYSCALL(io_cancel);
COND_SYSCALL(io_getevents);
+COND_SYSCALL(io_pgetevents);
COND_SYSCALL_COMPAT(io_getevents);
+COND_SYSCALL_COMPAT(io_pgetevents);
/* fs/xattr.c */