]> gitweb.factorcode.org Git - factor.git/blob - extra/unix/kqueue/openbsd/openbsd.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / extra / unix / kqueue / openbsd / openbsd.factor
1 USE: alien.syntax
2 IN: unix.kqueue
3
4 C-STRUCT: kevent
5     { "uint"   "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     { "int"    "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 : EVFILT_READ     -1 ; inline
16 : EVFILT_WRITE    -2 ; inline
17 : EVFILT_AIO      -3 ; inline ! attached to aio requests
18 : EVFILT_VNODE    -4 ; inline ! attached to vnodes
19 : EVFILT_PROC     -5 ; inline ! attached to struct proc
20 : EVFILT_SIGNAL   -6 ; inline ! attached to struct proc
21 : EVFILT_TIMER    -7 ; inline ! timers