use core::ffi::c_void;
use super::Header;
#[repr(C)]
#[derive(Clone, Copy, Debug, bytemuck::Zeroable)]
pub struct LoopWaitData {
pub header: Header,
pub ms: u32,
pub reserved: u32,
pub left_ns: i64,
}
impl_headed!(LoopWaitData);
pub type LoopWaitFn = unsafe extern "system" fn(wait: *const LoopWaitData, user: *mut c_void);
pub type ServerWaitFn = unsafe extern "system" fn(wait_ns: *mut u64, user: *mut c_void);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct LoopWaitSites(pub u32);
impl LoopWaitSites {
pub const NONE: Self = Self(0);
pub const HANDLES: Self = Self(1);
pub const MESSAGES: Self = Self(2);
#[must_use]
pub const fn contains(self, other: Self) -> bool {
self.0 & other.0 == other.0
}
}