io_uring_register_eventfd(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | NOTES | RETURN VALUE | SEE ALSO | COLOPHON

io_uring_register_eventfd(3) liburing Manualio_uring_register_eventfd(3)

NAME         top

       io_uring_register_eventfd - register an eventfd with a ring

SYNOPSIS         top

       #include <liburing.h>

       int io_uring_register_eventfd(struct io_uring *ring,
                                     int fd);

       int io_uring_register_eventfd_async(struct io_uring *ring,
                                           int fd);

       int io_uring_unregister_eventfd(struct io_uring *ring);

DESCRIPTION         top

       io_uring_register_eventfd(3) registers the eventfd file
       descriptor fd with the ring identified by ring.

       Whenever completions are posted to the CQ ring, an eventfd
       notification is generated with the registered eventfd descriptor.
       If 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,
       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.

NOTES         top

       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.

RETURN VALUE         top

       Returns 0 on success, or or -errno on error.

SEE ALSO         top

       eventfd(2)

COLOPHON         top

       This page is part of the liburing (A library for io_uring)
       project.  Information about the project can be found at 
       ⟨https://github.com/axboe/liburing⟩.  If you have a bug report for
       this manual page, send it to io-uring@vger.kernel.org.  This page
       was obtained from the project's upstream Git repository
       ⟨https://github.com/axboe/liburing⟩ on 2023-12-22.  (At that
       time, the date of the most recent commit that was found in the
       repository was 2023-12-19.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

liburing-2.2                 April 16, 2022 io_uring_register_eventfd(3)

Pages that refer to this page: io_uring_register_eventfd(3)io_uring_register_eventfd_async(3)io_uring_unregister_eventfd(3)