feat(kernel): WatchDeath + SetTimer events as notification signals; adapter wakes at earliest deadline
This commit is contained in:
@@ -77,6 +77,9 @@ pub struct Kernel<P: Platform> {
|
||||
tree: domain::capability::tree::CapTree<{ captree::ALL_CAPS }>,
|
||||
/// Where each process's next heap search starts (see memory.rs).
|
||||
heap_cursors: [usize; MAX_PROCESSES],
|
||||
/// Who to signal when each process dies (see syscall/ipc/events.rs).
|
||||
death_watchers: [Option<domain::timer::Target>; MAX_PROCESSES],
|
||||
timers: domain::timer::Timers,
|
||||
}
|
||||
|
||||
impl<P: Platform> Kernel<P> {
|
||||
@@ -99,6 +102,8 @@ impl<P: Platform> Kernel<P> {
|
||||
homes: [types::id::CoreId::from_raw(0); MAX_THREADS],
|
||||
tree: domain::capability::tree::CapTree::new(),
|
||||
heap_cursors: [0; MAX_PROCESSES],
|
||||
death_watchers: [None; MAX_PROCESSES],
|
||||
timers: domain::timer::Timers::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +138,8 @@ impl<P: Platform> Kernel<P> {
|
||||
addr_of_mut!((*slot).homes).write([types::id::CoreId::from_raw(0); MAX_THREADS]);
|
||||
addr_of_mut!((*slot).tree).write(domain::capability::tree::CapTree::new());
|
||||
addr_of_mut!((*slot).heap_cursors).write([0; MAX_PROCESSES]);
|
||||
addr_of_mut!((*slot).death_watchers).write([None; MAX_PROCESSES]);
|
||||
addr_of_mut!((*slot).timers).write(domain::timer::Timers::new());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user