libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
epoll.h
1#ifndef _CRTX_EPOLL_H
2#define _CRTX_EPOLL_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/*
9 * Mario Kicherer (dev@kicherer.org) 2016
10 *
11 */
12
13#include <sys/epoll.h>
14
16 struct crtx_listener_base base;
17
18 struct crtx_event_loop *evloop;
19
20 int epoll_fd;
21 size_t max_n_events;
22 int timeout;
23
24 struct epoll_event *events;
25 int n_rdy_events;
26 int cur_event_idx;
27
28 char stop;
29};
30
31int crtx_epoll_flags2crtx_event_flags(int epoll_flags);
32int crtx_event_flags2epoll_flags(int crtx_event_flags);
33
34struct crtx_listener_base *crtx_setup_epoll_listener(void *options);
35void crtx_epoll_init();
36void crtx_epoll_finish();
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif
Definition epoll.h:15
Definition evloop.h:116
base structure of a listener
Definition core.h:186