use types::{ address::{DataRef, EntryPoint, StackPointer, VirtualAddress}, bounded::{CapSlot, PageCount}, permission::PermissionSet, }; use crate::message::Message; pub struct WaitSet { endpoints: [Option; 4], interrupts: [Option; 4], } pub enum WakeReason { MessageReady(CapSlot), InterruptFired(CapSlot), } pub enum Syscall { Send { endpoint: CapSlot, message: Message, }, Receive { endpoint: CapSlot, }, Delegate { slot: CapSlot, to_endpoint: CapSlot, permissions: PermissionSet, }, WaitForInterrupt { irq: CapSlot, }, AcknowledgeInterrupt { irq: CapSlot, }, WaitAny { sources: WaitSet, }, CreateProcess { create_cap: CapSlot, image: DataRef, }, Kill { process: CapSlot, }, SpawnThread { entry: EntryPoint, stack: StackPointer, }, ExitThread, RequestPages { count: PageCount, }, ReleasePages { addr: VirtualAddress, count: PageCount, }, GetTime, GetProcessId, Yield, Exit, }