//! Data structures for process management use core::time::Duration; use crate::{impl_place_lifetime, io::FileMode}; mod exit; mod signal; mod spawn; pub use exit::ExitCode; pub use signal::{Signal, SignalEntryData}; pub use spawn::{ExecveOptions, SpawnOption, SpawnOptions, ThreadSpawnOptions}; /// Describes a single mutex operation #[derive(Clone, Debug)] #[repr(C)] pub enum MutexOperation { /// Waits on the mutex object until it is different from "compare value" Wait(u32, Option), /// Wakes a single mutex-waiting thread Wake, /// Wakes all threads waiting on the mutex WakeAll, } /// Provides some amount of process-related information #[derive(Clone, Debug)] pub enum ProcessInfoElement { /// Mask applied to file modes when creating new files/directories Umask(FileMode), } // TODO not sure if I really need #[repr(C)] ABI here impl_place_lifetime! { #[doc = "Argument struct passed from the kernel to a spawned process"] #[derive(Debug)] pub struct ProgramArgumentInner<'a> { #[doc = "Argument list"] pub args: &'a [&'a str], #[doc = "List of KEY=VALUE environment variable pairs"] pub env: &'a [&'a str], } }