io\_uring\_prep\_epoll\_ctl(3) liburing Manual io\_uring\_prep\_epoll\_ctl(3)

# [NAME](#NAME)

io\_uring\_prep\_epoll\_ctl - prepare an epoll\_ctl request

# [SYNOPSIS](#SYNOPSIS)

```
#include <liburing.h>
```

```
void io_uring_prep_epoll_ctl(struct io_uring_sqe *sqe,
                             int epfd,
                             int fd,
                             int op,
                             const struct epoll_event *ev);
```

# [DESCRIPTION](#DESCRIPTION)

The [**io\_uring\_prep\_epoll\_ctl**(3)](/man/os/liburing/io_uring_prep_epoll_ctl.3) function prepares an epoll control request. The submission queue entry *sqe* is setup to use the epoll instance referred to by *epfd*, performing the operation *op* on the file descriptor *fd*. The *ev* argument points to an *epoll\_event* structure as defined in [**epoll\_ctl**(2)](/man/os/liburing/epoll_ctl.2).

The *op* argument can be one of:

[**EPOLL\_CTL\_ADD**](#EPOLL_CTL_ADD)

Add *fd* to the epoll instance.

[**EPOLL\_CTL\_MOD**](#EPOLL_CTL_MOD)

Modify the settings for *fd*.

[**EPOLL\_CTL\_DEL**](#EPOLL_CTL_DEL)

Remove *fd* from the epoll instance. *ev* is ignored for this operation.

This function prepares an async [**epoll\_ctl**(2)](/man/os/liburing/epoll_ctl.2) request. See that man page for details.

# [RETURN VALUE](#RETURN_VALUE)

None

# [ERRORS](#ERRORS)

The CQE *res* field will contain the result of the operation, 0 on success. On error, a negative errno value is returned. See [**epoll\_ctl**(2)](/man/os/liburing/epoll_ctl.2) for possible error values.

# [SEE ALSO](#SEE_ALSO)

[**io\_uring\_get\_sqe**(3)](/man/os/liburing/io_uring_get_sqe.3), [**io\_uring\_submit**(3)](/man/os/liburing/io_uring_submit.3), [**io\_uring\_prep\_epoll\_wait**(3)](/man/os/liburing/io_uring_prep_epoll_wait.3), [**epoll\_ctl**(2)](/man/os/liburing/epoll_ctl.2)

January 18, 2025 liburing-2.4

---

Document: io_uring_prep_epoll_ctl(3) from liburing 2.15-r5 (Chainguard OS)
Source: https://github.com/axboe/liburing.git
