Lines Matching +full:use +full:- +full:libc
1 use crate::errno::Errno;
2 use crate::Result;
3 use libc::{self, c_int};
4 use std::mem;
5 use std::os::unix::io::RawFd;
6 use std::ptr;
33 EpollCtlAdd = libc::EPOLL_CTL_ADD,
34 EpollCtlDel = libc::EPOLL_CTL_DEL,
35 EpollCtlMod = libc::EPOLL_CTL_MOD,
47 event: libc::epoll_event,
51 pub fn new(events: EpollFlags, data: u64) -> Self { in new()
53 event: libc::epoll_event { in new()
60 pub fn empty() -> Self { in empty()
64 pub fn events(&self) -> EpollFlags { in events()
68 pub fn data(&self) -> u64 { in data()
74 pub fn epoll_create() -> Result<RawFd> { in epoll_create()
75 let res = unsafe { libc::epoll_create(1024) }; in epoll_create()
81 pub fn epoll_create1(flags: EpollCreateFlags) -> Result<RawFd> { in epoll_create1()
82 let res = unsafe { libc::epoll_create1(flags.bits()) }; in epoll_create1()
93 ) -> Result<()> in epoll_ctl()
103 libc::epoll_ctl(epfd, op as c_int, fd, &mut event.event) in epoll_ctl()
105 libc::epoll_ctl(epfd, op as c_int, fd, ptr::null_mut()) in epoll_ctl()
117 ) -> Result<usize> { in epoll_wait()
119 libc::epoll_wait( in epoll_wait()
121 events.as_mut_ptr() as *mut libc::epoll_event, in epoll_wait()