perf(kernel): kernel static all-zero -> .bss (image 812K -> 173K): domain::Slot (repr(u8) Empty=0) for tables, zero generation counters, core ids by position, pool/platform installed at boot; Option-backed Slot under kani (cbmc speed); build fails if .data > 16K
This commit is contained in:
@@ -148,7 +148,7 @@ impl<P: Platform> Kernel<P> {
|
||||
return SyscallOutcome::Complete(SyscallResult::Error(KernelError::EndpointFull));
|
||||
}
|
||||
if let Some(s) = self.ipc_mut(tid) {
|
||||
s.outgoing = Some(out);
|
||||
s.outgoing.set(out);
|
||||
}
|
||||
let reason = if is_call {
|
||||
BlockReason::Calling(ep)
|
||||
|
||||
@@ -42,7 +42,7 @@ pub(crate) struct Outgoing {
|
||||
/// Per-thread IPC bookkeeping.
|
||||
#[derive(Debug, Clone, Copy, Default)]
|
||||
pub struct IpcState {
|
||||
pub(crate) outgoing: Option<Outgoing>,
|
||||
pub(crate) outgoing: domain::slot::Slot<Outgoing>,
|
||||
/// The caller this thread owes a reply to.
|
||||
pub(crate) reply_to: Option<ThreadRef>,
|
||||
/// Callers it kept to answer later (`SaveReply`).
|
||||
@@ -55,7 +55,7 @@ pub(crate) const SAVED: usize = types::bounded::SavedReply::MAX as usize + 1;
|
||||
|
||||
impl IpcState {
|
||||
pub const EMPTY: Self = Self {
|
||||
outgoing: None,
|
||||
outgoing: domain::slot::Slot::Empty,
|
||||
reply_to: None,
|
||||
saved: [None; SAVED],
|
||||
bound: None,
|
||||
@@ -73,7 +73,7 @@ impl<P: Platform> Kernel<P> {
|
||||
|
||||
pub(crate) fn set_pending_result(&mut self, tid: ThreadId, result: Option<SyscallResult>) {
|
||||
if let Some(r) = self.pending_results.get_mut(tid.raw() as usize) {
|
||||
*r = result;
|
||||
*r = result.into();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user