1#ifndef __VSF_LINUX_SYS_EPOLL_H__
2#define __VSF_LINUX_SYS_EPOLL_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
7# include "../sys/types.h"
21#define EPOLL_CLOEXEC O_CLOEXEC
23#define EPOLL_CTL_ADD 0
24#define EPOLL_CTL_MOD 1
25#define EPOLL_CTL_DEL 2
28#define EPOLLOUT POLLOUT
29#define EPOLLHUP POLLHUP
30#define EPOLLERR POLLERR
31#define EPOLLPRI POLLPRI
33#define EPOLLET (1 << 16)
34#define EPOLLONESHOT (1 << 17)
35#define EPOLLWAKEUP (1 << 18)
36#define EPOLLEXCLUSIVE (1 << 19)
50#if VSF_LINUX_CFG_WRAPPER == ENABLED
51#define epoll_create VSF_LINUX_WRAPPER(epoll_create)
52#define epoll_create1 VSF_LINUX_WRAPPER(epoll_create1)
53#define epoll_ctl VSF_LINUX_WRAPPER(epoll_ctl)
54#define epoll_wait VSF_LINUX_WRAPPER(epoll_wait)
55#define epoll_pwait VSF_LINUX_WRAPPER(epoll_pwait)
56#define epoll_pwait2 VSF_LINUX_WRAPPER(epoll_pwait2)
61#define __NR_epoll_create epoll_create
62#define __NR_epoll_create1 epoll_create1
63#define __NR_epoll_ctl epoll_ctl
64#define __NR_epoll_wait epoll_wait
65#define __NR_epoll_pwait(__epfd, __events, __maxevents, __timeout, __set, __set_size)\
66 epoll_pwait((__epfd), (__events), (__maxevents), (__timeout), (__set))
68#if VSF_LINUX_APPLET_USE_SYS_EPOLL == ENABLED
79# ifndef __VSF_APPLET__
84#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_EPOLL_LIB__))\
85 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_EPOLL == ENABLED
87#ifndef VSF_LINUX_APPLET_SYS_EPOLL_VPLT
88# if VSF_LINUX_USE_APPLET == ENABLED
89# define VSF_LINUX_APPLET_SYS_EPOLL_VPLT \
90 ((vsf_linux_sys_epoll_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_epoll_vplt))
92# define VSF_LINUX_APPLET_SYS_EPOLL_VPLT \
93 ((vsf_linux_sys_epoll_vplt_t *)vsf_vplt((void *)0))
97#define VSF_LINUX_APPLET_SYS_EPOLL_ENTRY(__NAME) \
98 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_EPOLL_VPLT, __NAME)
99#define VSF_LINUX_APPLET_SYS_EPOLL_IMP(...) \
100 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_EPOLL_VPLT, __VA_ARGS__)
106VSF_LINUX_APPLET_SYS_EPOLL_IMP(
epoll_create1,
int,
int flags) {
108 return VSF_LINUX_APPLET_SYS_EPOLL_ENTRY(
epoll_create1)(flags);
110VSF_LINUX_APPLET_SYS_EPOLL_IMP(
epoll_ctl,
int,
int epfd,
int op,
int fd,
struct epoll_event *event) {
112 return VSF_LINUX_APPLET_SYS_EPOLL_ENTRY(
epoll_ctl)(epfd, op, fd, event);
#define epoll_ctl
Definition epoll.h:53
#define epoll_create1
Definition epoll.h:52
#define epoll_pwait2
Definition epoll.h:56
__VSF_VPLT_DECORATOR__ vsf_linux_sys_epoll_vplt_t vsf_linux_sys_epoll_vplt
Definition vsf_linux_fs.c:3596
#define epoll_pwait
Definition epoll.h:55
#define epoll_create
Definition epoll.h:51
#define epoll_wait
Definition epoll.h:54
union epoll_data epoll_data_t
struct epoll_event VSF_CAL_PACKED
__le16 timeout
Definition ieee80211.h:94
unsigned int uint32_t
Definition lvgl.h:43
unsigned long long uint64_t
Definition stdint.h:11
uint32_t events
Definition epoll.h:46
epoll_data_t data
Definition epoll.h:47
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(epoll_pwait)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(epoll_create)
vsf_vplt_info_t info
Definition epoll.h:70
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(epoll_wait)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(epoll_ctl)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(epoll_create1)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(epoll_pwait2)
uint64_t u64
Definition epoll.h:42
uint32_t u32
Definition epoll.h:41
void * ptr
Definition epoll.h:39
int fd
Definition epoll.h:40
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165
uint32_t size
Definition vsf_memfs.h:50
struct event_t events[32]
Definition vsf_xboot.c:36