Skip to main content

dope_core/platform/
mod.rs

1/// Thread-local CPU-affinity capabilities.
2pub mod affinity;
3
4/// Process-signal acquisition and scoped waiting.
5pub mod signal;
6
7/// Borrowed descriptor readiness with owned poll storage.
8pub mod poll;
9
10/// Owned process-control record channels.
11pub mod channel;
12
13/// Pipe notification endpoints and timed observation.
14pub mod wake;
15
16/// Failed read or update of descriptor flags.
17#[derive(Clone, Copy, Debug, PartialEq, Eq)]
18pub enum Flags {
19    Get(crate::Errno),
20    Set(crate::Errno),
21}
22
23impl Flags {
24    fn cloexec(error: dope_sys::Cloexec) -> Self {
25        match error {
26            dope_sys::Cloexec::Get(error) => Self::Get(error),
27            dope_sys::Cloexec::Set(error) => Self::Set(error),
28        }
29    }
30    fn nonblock(error: dope_sys::Nonblock) -> Self {
31        match error {
32            dope_sys::Nonblock::Get(error) => Self::Get(error),
33            dope_sys::Nonblock::Set(error) => Self::Set(error),
34        }
35    }
36}
37
38/// Scoped ownership of worker inputs, native threads, and joined outputs.
39pub mod thread;