]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/kqueue/freebsd/freebsd.factor
Re-add Freebsd Support
[factor.git] / basis / unix / kqueue / freebsd / freebsd.factor
1 USING: alien.c-types alien.syntax classes.struct unix.types unix.time ;
2 IN: unix.kqueue
3
4 STRUCT: kevent
5     { ident  ulong }
6     { filter short }
7     { flags  ushort }
8     { fflags uint }
9     { data __uint64_t }
10     { udata  void* } 
11     { ext[4] __uint64_t } ;
12
13 FUNCTION-ALIAS: kevent-func int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout )
14
15 ! from FreeBSD 12 sys/sys/event.h
16
17 CONSTANT: EVFILT_READ     -1
18 CONSTANT: EVFILT_WRITE    -2
19 CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
20 CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
21 CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
22 CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
23 CONSTANT: EVFILT_TIMER    -7 ! timers
24 CONSTANT: EVFILT_PROCDESC -8 ! attached to process descriptors
25 CONSTANT: EVFILT_FS       -9 ! Filesystem events
26 CONSTANT: EVFILT_LIO      -10 ! attached to lio requests
27 CONSTANT: EVFILT_USER     -11 ! user events
28 CONSTANT: EVFILT_SENDFILE -12 ! attached to sendfile requests
29 CONSTANT: EVFILT_EMPTY    -13 ! empty send socket buf
30 CONSTANT: EVFILT_SYSCOUNT  13
31