1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: alien.syntax math ;
6 FUNCTION: int epoll_create ( int size ) ;
8 FUNCTION: int epoll_ctl ( int epfd, int op, int fd, epoll_event* event ) ;
13 { "uint" "padding" } ;
15 FUNCTION: int epoll_wait ( int epfd, epoll_event* events, int maxevents, int timeout ) ;
17 CONSTANT: EPOLL_CTL_ADD 1 ! Add a file decriptor to the interface.
18 CONSTANT: EPOLL_CTL_DEL 2 ! Remove a file decriptor from the interface.
19 CONSTANT: EPOLL_CTL_MOD 3 ! Change file decriptor epoll_event structure.
21 CONSTANT: EPOLLIN HEX: 001
22 CONSTANT: EPOLLPRI HEX: 002
23 CONSTANT: EPOLLOUT HEX: 004
24 CONSTANT: EPOLLRDNORM HEX: 040
25 CONSTANT: EPOLLRDBAND HEX: 080
26 CONSTANT: EPOLLWRNORM HEX: 100
27 CONSTANT: EPOLLWRBAND HEX: 200
28 CONSTANT: EPOLLMSG HEX: 400
29 CONSTANT: EPOLLERR HEX: 008
30 CONSTANT: EPOLLHUP HEX: 010
31 : EPOLLONESHOT ( -- n ) 30 2^ ; inline
32 : EPOLLET ( -- n ) 31 2^ ; inline