]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/kqueue/macosx/macosx.factor
0bc6ce57857cf2077c76cb03860b8dd5e4cf22c4
[factor.git] / basis / unix / kqueue / macosx / macosx.factor
1 USING: alien.syntax constants ;
2 IN: unix.kqueue
3
4 C-STRUCT: kevent
5     { "ulong"  "ident"  } ! identifier for this event
6     { "short"  "filter" } ! filter for event
7     { "ushort" "flags"  } ! action flags for kqueue
8     { "uint"   "fflags" } ! filter flag value
9     { "long"   "data"   } ! filter data value
10     { "void*"  "udata"  } ! opaque user data identifier
11 ;
12
13 FUNCTION: int kevent ( int kq, kevent* changelist, int nchanges, kevent* eventlist, int nevents, timespec* timeout ) ;
14
15 CONSTANT: EVFILT_READ     -1
16 CONSTANT: EVFILT_WRITE    -2
17 CONSTANT: EVFILT_AIO      -3 ! attached to aio requests
18 CONSTANT: EVFILT_VNODE    -4 ! attached to vnodes
19 CONSTANT: EVFILT_PROC     -5 ! attached to struct proc
20 CONSTANT: EVFILT_SIGNAL   -6 ! attached to struct proc
21 CONSTANT: EVFILT_TIMER    -7 ! timers
22 CONSTANT: EVFILT_MACHPORT -8 ! Mach ports
23 CONSTANT: EVFILT_FS       -9 ! Filesystem events