---
name: "rte_epoll_ctl"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_epoll.h"
---

# rte\_epoll\_ctl(3)

Part of [rte\_epoll.h(3)](/rte_epoll.h/3.md).

## NAME

rte\_epoll.h

## SYNOPSIS

`#include <stdint.h>`\
 `#include <rte_stdatomic.h>`\

### Data Structures

struct **rte\_epoll\_event**\

### Macros

\#define **RTE\_EPOLL\_PER\_THREAD**   -1\

### Functions

int **rte\_epoll\_wait** (int epfd, struct **rte\_epoll\_event** \*events, int maxevents, int timeout)\
 int **rte\_epoll\_wait\_interruptible** (int epfd, struct **rte\_epoll\_event** \*events, int maxevents, int timeout)\
 int **rte\_epoll\_ctl** (int epfd, int op, int fd, struct **rte\_epoll\_event** \*event)\

## Detailed Description

The rte\_epoll provides interfaces functions to add delete events, wait poll for an event.

Definition in file **rte\_epoll.h**.

## Macro Definition Documentation

### #define RTE\_EPOLL\_PER\_THREAD -1

to hint using per thread epfd

Definition at line **48** of file **rte\_epoll.h**.

## Function Documentation

### int rte\_epoll\_wait (int epfd, struct rte\_epoll\_event \* events, int maxevents, int timeout)

It waits for events on the epoll instance. Retries if signal received.

**Parameters**

*epfd* Epoll instance fd on which the caller wait for events. \
 *events* Memory area contains the events that will be available for the caller. \
 *maxevents* Up to maxevents are returned, must greater than zero. \
 *timeout* Specifying a timeout of -1 causes a block indefinitely. Specifying a timeout equal to zero cause to return immediately.

**Returns**

- •

  On success, returns the number of available event.

- •

  On failure, a negative value.

### int rte\_epoll\_wait\_interruptible (int epfd, struct rte\_epoll\_event \* events, int maxevents, int timeout)

It waits for events on the epoll instance. Does not retry if signal received.

**Parameters**

*epfd* Epoll instance fd on which the caller wait for events. \
 *events* Memory area contains the events that will be available for the caller. \
 *maxevents* Up to maxevents are returned, must greater than zero. \
 *timeout* Specifying a timeout of -1 causes a block indefinitely. Specifying a timeout equal to zero cause to return immediately.

**Returns**

- •

  On success, returns the number of available event.

- •

  On failure, a negative value.

### int rte\_epoll\_ctl (int epfd, int op, int fd, struct rte\_epoll\_event \* event)

It performs control operations on epoll instance referred by the epfd. It requests that the operation op be performed for the target fd.

**Parameters**

*epfd* Epoll instance fd on which the caller perform control operations. \
 *op* The operation be performed for the target fd. \
 *fd* The target fd on which the control ops perform. \
 *event* Describes the object linked to the fd. Note: The caller must take care the object deletion after CTL\_DEL.

**Returns**

- •

  On success, zero.

- •

  On failure, a negative value.

## Author

Generated automatically by Doxygen for DPDK from the source code.
