summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-02-08 11:40:17 -0700
committerJens Axboe <axboe@kernel.dk>2019-02-08 11:40:17 -0700
commite377c38ca7f5a55a7ed8ebd4486abcf4d39f4fd6 (patch)
tree7c696b9210551e56a8af6b2185035e1384c50a80
parentf171fa43abf5a938dde32125cc1a58dc1ed2273c (diff)
downloadliburing-e377c38ca7f5a55a7ed8ebd4486abcf4d39f4fd6.tar.gz
liburing-e377c38ca7f5a55a7ed8ebd4486abcf4d39f4fd6.tar.bz2
io_uring_enter: don't expose sigset_size argument
Applications should not need to care about this, we can pass it in ourselves. Once the libc support is there, we won't expose this parameter either. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--src/liburing.h2
-rw-r--r--src/queue.c4
-rw-r--r--src/syscall.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/src/liburing.h b/src/liburing.h
index 9c8c13e..623556a 100644
--- a/src/liburing.h
+++ b/src/liburing.h
@@ -47,7 +47,7 @@ struct io_uring {
*/
extern int io_uring_setup(unsigned entries, struct io_uring_params *p);
extern int io_uring_enter(unsigned fd, unsigned to_submit,
- unsigned min_complete, unsigned flags, sigset_t *sig, size_t sigsz);
+ unsigned min_complete, unsigned flags, sigset_t *sig);
extern int io_uring_register(int fd, unsigned int opcode, void *arg,
unsigned int nr_args);
diff --git a/src/queue.c b/src/queue.c
index f2b73a4..d37a7af 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -29,7 +29,7 @@ static int __io_uring_get_completion(struct io_uring *ring,
if (!wait)
break;
ret = io_uring_enter(ring->ring_fd, 0, 1,
- IORING_ENTER_GETEVENTS, NULL, _NSIG / 8);
+ IORING_ENTER_GETEVENTS, NULL);
if (ret < 0)
return -errno;
} while (1);
@@ -112,7 +112,7 @@ int io_uring_submit(struct io_uring *ring)
submit:
return io_uring_enter(ring->ring_fd, submitted, 0,
- IORING_ENTER_GETEVENTS, NULL, _NSIG / 8);
+ IORING_ENTER_GETEVENTS, NULL);
}
/*
diff --git a/src/syscall.c b/src/syscall.c
index aa82c3b..42154f7 100644
--- a/src/syscall.c
+++ b/src/syscall.c
@@ -4,6 +4,7 @@
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/uio.h>
+#include <signal.h>
#include "compat.h"
#include "io_uring.h"
@@ -33,8 +34,8 @@ int io_uring_setup(unsigned int entries, struct io_uring_params *p)
}
int io_uring_enter(int fd, unsigned int to_submit, unsigned int min_complete,
- unsigned int flags, sigset_t *sig, size_t sigsz)
+ unsigned int flags, sigset_t *sig)
{
return syscall(__NR_sys_io_uring_enter, fd, to_submit, min_complete,
- flags, sig, sigsz);
+ flags, sig, _NSIG / 8);
}