1#ifndef __VSF_LINUX_SYS_EVENT_H__
2#define __VSF_LINUX_SYS_EVENT_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
7# include "../sys/types.h"
17#if VSF_LINUX_CFG_WRAPPER == ENABLED
18#define kqueue VSF_LINUX_WRAPPER(kqueue)
19#define kevent VSF_LINUX_WRAPPER(kevent)
22#define EV_SET(__kevp, __ident, __filter, __flags, __fflags, __data, __udata) \
24 (__kevp)->ident = (__ident); \
25 (__kevp)->filter = (__filter); \
26 (__kevp)->flags = (__flags); \
27 (__kevp)->fflags = (__fflags); \
28 (__kevp)->data = (__data); \
29 (__kevp)->udata = (__udata); \
43#define EVFILT_WRITE -2
45#define EVFILT_VNODE -4
47#define EVFILT_SIGNAL -6
48#define EVFILT_TIMER -7
50#define EVFILT_SYSCOUNT 8
53#define EV_ADD (1 << 0)
54#define EV_DELETE (1 << 1)
55#define EV_ENABLE (1 << 2)
56#define EV_DISABLE (1 << 3)
58#define EV_ONSHOT (1 << 4)
59#define EV_CLEAR (1 << 5)
61#define EV_SYSFLAGS (0xF << 12)
62#define EV_EOF (0x8 << 12)
63#define EV_ERROR (0x4 << 12)
66#define NOTE_DELETE (1 << 0)
67#define NOTE_WRITE (1 << 1)
68#define NOTE_EXTEND (1 << 2)
69#define NOTE_ATTRIB (1 << 3)
70#define NOTE_LINK (1 << 4)
71#define NOTE_RENAME (1 << 5)
72#define NOTE_REVOKE (1 << 6)
77#if VSF_LINUX_APPLET_USE_SYS_EVENT == ENABLED
84# ifndef __VSF_APPLET__
89#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_EVENT_LIB__))\
90 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_EVENT == ENABLED
92#ifndef VSF_LINUX_APPLET_SYS_EVENT_VPLT
93# if VSF_LINUX_USE_APPLET == ENABLED
94# define VSF_LINUX_APPLET_SYS_EVENT_VPLT \
95 ((vsf_linux_sys_event_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_event_vplt))
97# define VSF_LINUX_APPLET_SYS_EVENT_VPLT \
98 ((vsf_linux_sys_event_vplt_t *)vsf_vplt((void *)0))
102#define VSF_LINUX_APPLET_SYS_EVENT_ENTRY(__NAME) \
103 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_EVENT_VPLT, __NAME)
104#define VSF_LINUX_APPLET_SYS_EVENT_IMP(...) \
105 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_EVENT_VPLT, __VA_ARGS__)
107VSF_LINUX_APPLET_SYS_EVENT_IMP(
kqueue,
int,
void) {
108 return VSF_LINUX_APPLET_SYS_EVENT_ENTRY(
kqueue)();
110VSF_LINUX_APPLET_SYS_EVENT_IMP(
kevent,
int,
int kq,
const struct kevent *changelist,
int nchanges,
struct kevent *eventlist,
int nevents,
const struct timespec *
timeout) {
111 return VSF_LINUX_APPLET_SYS_EVENT_ENTRY(
kevent)(kq, changelist, nchanges, eventlist, nevents,
timeout);
118 struct kevent *eventlist,
int nevents,
__VSF_VPLT_DECORATOR__ vsf_linux_sys_event_vplt_t vsf_linux_sys_event_vplt
#define kqueue
Definition event.h:18
#define kevent
Definition event.h:19
__le16 timeout
Definition ieee80211.h:94
unsigned short u_short
Definition types.h:76
unsigned int u_int
Definition types.h:78
uint32_t uintptr_t
Definition stdint.h:38
int32_t intptr_t
Definition stdint.h:39
u_short flags
Definition event.h:35
intptr_t data
Definition event.h:37
void * udata
Definition event.h:38
u_int fflags
Definition event.h:36
uintptr_t ident
Definition event.h:33
short filter
Definition event.h:34
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(kqueue)
vsf_vplt_info_t info
Definition event.h:79
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(kevent)
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93