---
name: "io_uring_prep_epoll_ctl"
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_prep_epoll_ctl"
---

# io\_uring\_prep\_epoll\_ctl(3)

prepare an epoll\_ctl request

## NAME

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

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

The [**io\_uring\_prep\_epoll\_ctl**(3)](/io_uring_prep_epoll_ctl/3.md) 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)](/epoll_ctl/2.md).

The *op* argument can be one of:

- **EPOLL\_CTL\_ADD**

  Add *fd* to the epoll instance.

- **EPOLL\_CTL\_MOD**

  Modify the settings for *fd*.

- **EPOLL\_CTL\_DEL**

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

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

## RETURN VALUE

None

## 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)](/epoll_ctl/2.md) for possible error values.

## SEE ALSO

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