use crate::{bindings, const_conversions};
use num_enum::{IntoPrimitive, TryFromPrimitive};
bitflags::bitflags! {
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
pub struct EpollCreateFlags: i32 {
const EPOLL_CLOEXEC = const_conversions::i32_from_u32(bindings::LINUX_EPOLL_CLOEXEC);
}
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
#[repr(i32)]
#[allow(non_camel_case_types)]
pub enum EpollCtlOp {
EPOLL_CTL_ADD = const_conversions::i32_from_u32(bindings::LINUX_EPOLL_CTL_ADD),
EPOLL_CTL_MOD = const_conversions::i32_from_u32(bindings::LINUX_EPOLL_CTL_MOD),
EPOLL_CTL_DEL = const_conversions::i32_from_u32(bindings::LINUX_EPOLL_CTL_DEL),
}
bitflags::bitflags! {
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)]
pub struct EpollEvents: u32 {
const EPOLLIN = bindings::LINUX_EPOLLIN;
const EPOLLPRI = bindings::LINUX_EPOLLPRI;
const EPOLLOUT = bindings::LINUX_EPOLLOUT;
const EPOLLERR = bindings::LINUX_EPOLLERR;
const EPOLLHUP = bindings::LINUX_EPOLLHUP;
const EPOLLNVAL = bindings::LINUX_EPOLLNVAL;
const EPOLLRDNORM = bindings::LINUX_EPOLLRDNORM;
const EPOLLRDBAND = bindings::LINUX_EPOLLRDBAND;
const EPOLLWRNORM = bindings::LINUX_EPOLLWRNORM;
const EPOLLWRBAND = bindings::LINUX_EPOLLWRBAND;
const EPOLLMSG = bindings::LINUX_EPOLLMSG;
const EPOLLRDHUP = bindings::LINUX_EPOLLRDHUP;
const EPOLLEXCLUSIVE = bindings::LINUX_EPOLLEXCLUSIVE;
const EPOLLWAKEUP = bindings::LINUX_EPOLLWAKEUP;
const EPOLLONESHOT = bindings::LINUX_EPOLLONESHOT;
const EPOLLET = bindings::LINUX_EPOLLET;
}
}
#[allow(non_camel_case_types)]
pub type epoll_event = crate::bindings::linux_epoll_event;
unsafe impl shadow_pod::Pod for epoll_event {}