Sha256: 75bd6ed1434e95a9471c0a8b14278ca8d526cdcba5e549eb774e83b0edc20549

Contents?: true

Size: 1.71 KB

Versions: 13

Compression:

Stored size: 1.71 KB

Contents

.\" Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
.\"
.\" SPDX-License-Identifier: LGPL-2.0-or-later
.\"
.TH io_uring_register_eventfd 3 "April 16, 2022" "liburing-2.2" "liburing Manual"
.SH NAME
io_uring_register_eventfd \- register an eventfd with a ring
.SH SYNOPSIS
.nf
.B #include <liburing.h>
.PP
.BI "int io_uring_register_eventfd(struct io_uring *" ring ","
.BI "                              int " fd ");"
.PP
.BI "int io_uring_register_eventfd_async(struct io_uring *" ring ","
.BI "                                    int " fd ");"
.PP
.BI "int io_uring_unregister_eventfd(struct io_uring *" ring ");"
.fi
.SH DESCRIPTION
.PP
.BR io_uring_register_eventfd (3)
registers the eventfd file descriptor
.I fd
with the ring identified by
.IR ring .

Whenever completions are posted to the CQ ring, an eventfd notification
is generated with the registered eventfd descriptor. If
.BR io_uring_register_eventfd_async (3)
is used, only events that completed out-of-line will trigger a notification.

It notifications are no longer desired,
.BR io_uring_unregister_eventfd (3)
may be called to remove the eventfd registration. No eventfd argument is
needed, as a ring can only have a single eventfd registered.

.SH NOTES
While io_uring generally takes care to avoid spurious events, they can occur.
Similarly, batched completions of CQEs may only trigger a single eventfd
notification even if multiple CQEs are posted. The application should make no
assumptions on number of events being available having a direct correlation to
eventfd notifications posted. An eventfd notification must thus only be treated
as a hint to check the CQ ring for completions.
.SH RETURN VALUE
Returns 0 on success, or
or
.BR -errno
on error.
.SH SEE ALSO
.BR eventfd (2)

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
polyphony-1.0.1 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-1.0 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99.6 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99.5 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99.4 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99.3 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99.2 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99.1 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.99 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.98 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.97 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.96 vendor/liburing/man/io_uring_register_eventfd.3
polyphony-0.95 vendor/liburing/man/io_uring_register_eventfd.3