Advanced usage

https://img.shields.io/badge/linux%20kernel-5.1-green
int io_uring_register_buffers(struct io_uring *ring, const struct iovec *iovecs, unsigned nr_iovecs)

Register buffers to be used with fixed buffer operations such as io_uring_prep_write_fixed() and io_uring_prep_read_fixed().

Parameters

  • ring: io_uring structure as set up by io_uring_queue_init().

  • iovecs: pointer to iovec structure(s).

  • nr_iovecs: number of structures iovec structures

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.

See also


https://img.shields.io/badge/linux%20kernel-5.1-green
int io_uring_unregister_buffers(struct io_uring *ring)

Unregister buffers registered by io_uring_register_buffers().

Parameters

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.

See also


https://img.shields.io/badge/linux%20kernel-5.1-green
int io_uring_register_files(struct io_uring *ring, const int *files, unsigned nr_files)

Register file descriptors to be used in subsequent operations, like those that involve submission queue pollig (IORING_SETUP_SQPOLL).

Parameters

  • ring: io_uring structure as set up by io_uring_queue_init().

  • files: pointer to an array of file descriptors.

  • nr_files: number of file descriptors in the array.

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.

See also


https://img.shields.io/badge/linux%20kernel-5.1-green
int io_uring_unregister_files(struct io_uring *ring)

Unregister file descriptors registered by io_uring_register_files().

Parameters

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.

See also


https://img.shields.io/badge/linux%20kernel-5.5-green
int io_uring_register_files_update(struct io_uring *ring, unsigned off, int *files, unsigned nr_files)

Update the set of file descriptors registered with io_uring_register_files().

Parameters

  • ring: io_uring structure as set up by io_uring_queue_init().

  • off: offset in the file descriptors array to update from.

  • files: array of file descriptors.

  • nr_files: number of file descriptors in the array supplied.

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.


https://img.shields.io/badge/linux%20kernel-5.2-green
int io_uring_register_eventfd(struct io_uring *ring, int fd)

By registering an eventfd(2) file descriptor with io_uring, it is possible to get notified of completion events on an io_uring instance and this function lets you do just that.

Parameters

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.


https://img.shields.io/badge/linux%20kernel-5.6-green
int io_uring_register_eventfd_async(struct io_uring *ring, int fd)

Same as io_uring_register_eventfd(), except notifications are only posted for events that complete in an async manner. This means that events that complete inline while being submitted do not trigger a notification event.

Parameters

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.


https://img.shields.io/badge/linux%20kernel-5.2-green
int io_uring_unregister_eventfd(struct io_uring *ring)

Unregister the registered eventfd(2) file descriptor.

Parameters

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.


https://img.shields.io/badge/linux%20kernel-5.6-green
int io_uring_register_personality(struct io_uring *ring)

This operation registers credentials of the running application with io_uring, and returns an ID associated with these credentials. Applications wishing to share a ring between separate users/processes can pass in this credential ID in the SQE personality field. If set, that particular sqe will be issued with these credentials.

Parameters

Return value: returns the personality ID on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.


https://img.shields.io/badge/linux%20kernel-5.6-green
int io_uring_unregister_personality(struct io_uring *ring, int id)

Unregisters a personality previously registered with io_uring_register_personality().

Parameters

Return value: returns 0 on success and -errono on failure. You can use strerror(3) to get a human readable version of the reason for failure.