io_uring_get_sqe - Man Page

get the next available submission queue entry from the submission queue

Synopsis

#include <liburing.h>

struct io_uring_sqe *io_uring_get_sqe(struct io_uring *ring);

Description

The io_uring_get_sqe(3) function gets the next available submission queue entry from the submission queue belonging to the ring param.

On success io_uring_get_sqe(3) returns a pointer to the submission queue entry. On failure NULL is returned.

If a submission queue entry is returned, it should be filled out via one of the prep functions such as io_uring_prep_read(3) and submitted via io_uring_submit(3).

Note that neither io_uring_get_sqe nor the prep functions set (or clear) the user_data field of the SQE. If the caller expects io_uring_cqe_get_data(3) or io_uring_cqe_get_data64(3) to return valid data when reaping IO completions, either io_uring_sqe_set_data(3) or io_uring_sqe_set_data64(3) MUST have been called before submitting the request.

Return Value

io_uring_get_sqe(3) returns a pointer to the next submission queue event on success and NULL on failure. If NULL is returned, the SQ ring is currently full and entries must be submitted for processing before new ones can get allocated.

See Also

io_uring_submit(3), io_uring_sqe_set_data(3)

Referenced By

io_uring_cqe_get_data(3), io_uring_get_events(3), io_uring_prep_accept(3), io_uring_prep_bind(3), io_uring_prep_cancel(3), io_uring_prep_close(3), io_uring_prep_cmd(3), io_uring_prep_connect(3), io_uring_prep_fadvise(3), io_uring_prep_fallocate(3), io_uring_prep_files_update(3), io_uring_prep_fixed_fd_install(3), io_uring_prep_fsync(3), io_uring_prep_ftruncate(3), io_uring_prep_futex_wait(3), io_uring_prep_futex_waitv(3), io_uring_prep_futex_wake(3), io_uring_prep_getxattr(3), io_uring_prep_linkat(3), io_uring_prep_link_timeout(3), io_uring_prep_listen(3), io_uring_prep_madvise(3), io_uring_prep_mkdirat(3), io_uring_prep_nop(3), io_uring_prep_openat(3), io_uring_prep_openat2(3), io_uring_prep_poll_add(3), io_uring_prep_poll_remove(3), io_uring_prep_poll_update(3), io_uring_prep_provide_buffers(3), io_uring_prep_read(3), io_uring_prep_read_multishot(3), io_uring_prep_readv(3), io_uring_prep_readv2(3), io_uring_prep_recv(3), io_uring_prep_recvmsg(3), io_uring_prep_remove_buffers(3), io_uring_prep_renameat(3), io_uring_prep_send(3), io_uring_prep_sendmsg(3), io_uring_prep_send_set_addr(3), io_uring_prep_send_zc(3), io_uring_prep_setxattr(3), io_uring_prep_shutdown(3), io_uring_prep_socket(3), io_uring_prep_splice(3), io_uring_prep_statx(3), io_uring_prep_symlinkat(3), io_uring_prep_sync_file_range(3), io_uring_prep_tee(3), io_uring_prep_timeout(3), io_uring_prep_timeout_update(3), io_uring_prep_unlinkat(3), io_uring_prep_waitid(3), io_uring_prep_write(3), io_uring_prep_writev(3), io_uring_prep_writev2(3), io_uring_register_buffers(3), io_uring_register_files(3), io_uring_sqe_set_data(3), io_uring_submit(3), io_uring_submit_and_wait(3), io_uring_submit_and_wait_timeout(3).

July 10, 2020 liburing-0.7 liburing Manual