io_uring_queue_init - Man Page

setup io_uring submission and completion queues

Synopsis

#include <liburing.h>

int io_uring_queue_init(unsigned entries, struct io_uring *ring,
                        unsigned flags);

Description

The io_uring_queue_init() function executes the io_uring_setup syscall to initialize the submission and completion queues in the kernel with at least entries entries and then maps the resulting file descriptor to memory shared between the application and the kernel.

On success io_uring_queue_init() returns 0 and ring will point to the shared memory containing the io_uring queues. On failure -errno is returned.

flags will be passed through to the io_uring_setup syscall (see io_uring_setup(2)).

On success, the resources held by ring should be released via a corresponding call to io_uring_queue_exit(3).

Return Value

io_uring_queue_init(3) returns 0 on success and -errno on failure.

See Also

io_uring_setup(2), mmap(2), io_uring_queue_exit(3)

Referenced By

io_uring_queue_exit(3), io_uring_queue_init(3).

July 10, 2020 liburing-0.7 liburing Manual