29#ifndef _TIRPC_EVENT_H_
30#define _TIRPC_EVENT_H_
32#define EVFILT_READ (-1)
33#define EVFILT_WRITE (-2)
34#define EVFILT_AIO (-3)
35#define EVFILT_VNODE (-4)
36#define EVFILT_PROC (-5)
37#define EVFILT_SIGNAL (-6)
38#define EVFILT_TIMER (-7)
39#define EVFILT_NETDEV (-8)
41#define EVFILT_SYSCOUNT 8
43#define EV_SET(kevp_, a, b, c, d, e, f) do { \
44 struct kevent *kevp = (kevp_); \
45 (kevp)->ident = (a); \
46 (kevp)->filter = (b); \
47 (kevp)->flags = (c); \
48 (kevp)->fflags = (d); \
50 (kevp)->udata = (f); \
66#define EV_DELETE 0x0002
67#define EV_ENABLE 0x0004
68#define EV_DISABLE 0x0008
71#define EV_ONESHOT 0x0010
72#define EV_CLEAR 0x0020
74#define EV_SYSFLAGS 0xF000
75#define EV_FLAG1 0x2000
79#define EV_ERROR 0x4000
84#define NOTE_LOWAT 0x0001
89#define NOTE_DELETE 0x0001
90#define NOTE_WRITE 0x0002
91#define NOTE_EXTEND 0x0004
92#define NOTE_ATTRIB 0x0008
93#define NOTE_LINK 0x0010
94#define NOTE_RENAME 0x0020
95#define NOTE_REVOKE 0x0040
100#define NOTE_EXIT 0x80000000
101#define NOTE_FORK 0x40000000
102#define NOTE_EXEC 0x20000000
103#define NOTE_PCTRLMASK 0xf0000000
104#define NOTE_PDATAMASK 0x000fffff
107#define NOTE_TRACK 0x00000001
108#define NOTE_TRACKERR 0x00000002
109#define NOTE_CHILD 0x00000004
114#define NOTE_LINKUP 0x0001
115#define NOTE_LINKDOWN 0x0002
116#define NOTE_LINKINV 0x0004
130MALLOC_DECLARE(M_KQUEUE);
133#define KNOTE(list, hint) if ((list) != NULL) knote(list, hint)
139#define NOTE_SIGNAL 0x08000000
143 int (*f_attach)(
struct knote *kn);
144 void (*f_detach)(
struct knote *kn);
145 int (*f_event)(
struct knote *kn,
long hint);
161 struct filterops *kn_fop;
163#define KN_ACTIVE 0x01
164#define KN_QUEUED 0x02
165#define KN_DISABLED 0x04
166#define KN_DETACHED 0x08
168#define kn_id kn_kevent.ident
169#define kn_filter kn_kevent.filter
170#define kn_flags kn_kevent.flags
171#define kn_fflags kn_kevent.fflags
172#define kn_data kn_kevent.data
173#define kn_fp kn_ptr.p_fp
179extern void knote(
struct klist *
list,
long hint);
180extern void knote_remove(
struct thread *
p,
struct klist *
list);
181extern void knote_fdclose(
struct thread *
p,
int fd);
182extern int kqueue_register(
struct kqueue *kq,
184extern int kqueue_add_filteropts(
int filt,
struct filterops *filtops);
185extern int kqueue_del_filteropts(
int filt);
195 struct kevent *eventlist,
int nevents,
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
__BEGIN_DECLS int kqueue(void)
#define SLIST_ENTRY(type)
#define SLIST_HEAD(name, type)
#define TAILQ_ENTRY(type)