summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/backend/libc/event/types.rs
blob: 632b1be635f51eaf7b9c2581dbdd1cc02456905e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))]
use {crate::backend::c, bitflags::bitflags};

#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))]
bitflags! {
    /// `EFD_*` flags for use with [`eventfd`].
    ///
    /// [`eventfd`]: crate::io::eventfd
    #[repr(transparent)]
    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
    pub struct EventfdFlags: u32 {
        /// `EFD_CLOEXEC`
        const CLOEXEC = bitcast!(c::EFD_CLOEXEC);
        /// `EFD_NONBLOCK`
        const NONBLOCK = bitcast!(c::EFD_NONBLOCK);
        /// `EFD_SEMAPHORE`
        const SEMAPHORE = bitcast!(c::EFD_SEMAPHORE);
    }
}