feat(init): spawn service over IPC with per-client allowance refunded on child death; up to 4 death watchers; spawntest on test image

This commit is contained in:
2026-10-27 16:21:08 +01:00
parent 817a38993b
commit 8587661684
23 changed files with 564 additions and 28 deletions

View File

@@ -78,7 +78,7 @@ pub struct Kernel<P: Platform> {
/// 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],
death_watchers: [[Option<domain::timer::Target>; domain::timer::MAX_WATCHERS]; MAX_PROCESSES],
timers: domain::timer::Timers,
}
@@ -102,7 +102,7 @@ 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],
death_watchers: [[None; domain::timer::MAX_WATCHERS]; MAX_PROCESSES],
timers: domain::timer::Timers::new(),
}
}
@@ -138,7 +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).death_watchers)
.write([[None; domain::timer::MAX_WATCHERS]; MAX_PROCESSES]);
addr_of_mut!((*slot).timers).write(domain::timer::Timers::new());
}
}