65 lines
1.1 KiB
Rust
65 lines
1.1 KiB
Rust
use types::{
|
|
address::{DataRef, EntryPoint, StackPointer, VirtualAddress},
|
|
bounded::{CapSlot, PageCount},
|
|
permission::PermissionSet,
|
|
};
|
|
|
|
use crate::message::Message;
|
|
|
|
pub struct WaitSet {
|
|
endpoints: [Option<CapSlot>; 4],
|
|
interrupts: [Option<CapSlot>; 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,
|
|
}
|