xref: /drstd/dlibc/src/unix/header/sys_epoll/mod.rs (revision 9670759b785600bf6315e4173e46a602f16add7a)
1 //! sys/epoll.h implementation for Redox, following http://man7.org/linux/man-pages/man7/epoll.7.html
2 
3 use core::ptr;
4 
5 use sigset_t;
6 
7 use crate::unix::platform;
8 
9 pub use self::platform::*;
10 
11 #[no_mangle]
12 pub unsafe extern "C" fn epoll_create(_size: ::c_int) -> ::c_int {
13     ::epoll_create1(0)
14 }
15 
16 #[no_mangle]
17 pub extern "C" fn epoll_wait(
18     epfd: ::c_int,
19     events: *mut epoll_event,
20     maxevents: ::c_int,
21     timeout: ::c_int,
22 ) -> ::c_int {
23     unsafe{epoll_pwait(epfd, events, maxevents, timeout, ptr::null())}
24 }
25