---
name: "io_uring_unregister_eventfd"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_unregister_eventfd"
---

# io\_uring\_unregister\_eventfd(3)

register an eventfd with a ring

## NAME

io\_uring\_register\_eventfd - register an eventfd with a ring

## SYNOPSIS

```
#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

[**io\_uring\_register\_eventfd**(3)](/io_uring_register_eventfd/3.md) 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)](/io_uring_register_eventfd_async/3.md) is used, only events that completed out-of-line will trigger a notification.

If notifications are no longer desired, [**io\_uring\_unregister\_eventfd**(3)](/io_uring_unregister_eventfd/3.md) may be called to remove the eventfd registration. No eventfd argument is needed, as a ring can only have a single eventfd registered.

## 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.

## RETURN VALUE

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

## SEE ALSO

[**eventfd**(2)](/eventfd/2.md)
