DPDK  23.03.0
rte_epoll.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell International Ltd.
3  */
4 
5 #ifndef __RTE_EPOLL_H__
6 #define __RTE_EPOLL_H__
7 
14 #include <stdint.h>
15 
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define RTE_INTR_EVENT_ADD 1UL
22 #define RTE_INTR_EVENT_DEL 2UL
23 
24 typedef void (*rte_intr_event_cb_t)(int fd, void *arg);
25 
26 struct rte_epoll_data {
27  uint32_t event;
28  void *data;
29  rte_intr_event_cb_t cb_fun;
30  void *cb_arg;
31 };
32 
33 enum {
34  RTE_EPOLL_INVALID = 0,
35  RTE_EPOLL_VALID,
36  RTE_EPOLL_EXEC,
37 };
38 
41  uint32_t status;
42  int fd;
43  int epfd;
44  struct rte_epoll_data epdata;
45 };
46 
47 #define RTE_EPOLL_PER_THREAD -1
66 int
67 rte_epoll_wait(int epfd, struct rte_epoll_event *events,
68  int maxevents, int timeout);
69 
87 int
88 rte_epoll_wait_interruptible(int epfd, struct rte_epoll_event *events,
89  int maxevents, int timeout);
90 
108 int
109 rte_epoll_ctl(int epfd, int op, int fd,
110  struct rte_epoll_event *event);
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif /* __RTE_EPOLL_H__ */
int rte_epoll_wait_interruptible(int epfd, struct rte_epoll_event *events, int maxevents, int timeout)
int rte_epoll_wait(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)
uint32_t status
Definition: rte_epoll.h:41