From 996b5a65a58cfd3334fcc6c268911126ced35d61 Mon Sep 17 00:00:00 2001 From: Jeff Moyer Date: Fri, 8 Feb 2019 14:54:02 -0500 Subject: add io_uring_queue_mmap io_uring_queue_init does not allow the caller to specify sq_thread_cpu or sq_thread_idle. Users that want to specify those parameters need to call io_uring_setup(2) themselves. Add a helper so that they don't also have to hand-craft the code to map the submission and completion queues, and setup the sqe ring. This allows those applications to still make use of io_uring_submit and get/wait_completion. Signed-off-by: Jeff Moyer Signed-off-by: Jens Axboe --- src/liburing.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/liburing.h') diff --git a/src/liburing.h b/src/liburing.h index 623556a..2e7303c 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -56,6 +56,8 @@ extern int io_uring_register(int fd, unsigned int opcode, void *arg, */ extern int io_uring_queue_init(unsigned entries, struct io_uring *ring, unsigned flags); +extern int io_uring_queue_mmap(int fd, struct io_uring_params *p, + struct io_uring *ring); extern void io_uring_queue_exit(struct io_uring *ring); extern int io_uring_get_completion(struct io_uring *ring, struct io_uring_cqe **cqe_ptr); -- cgit