feat: SMP stage 2, lock-free fast paths (GetTime, GetProcessId, DebugPutchar, no-op Yield), storm checks yield equivalence

This commit is contained in:
2026-10-27 01:07:57 +01:00
parent 2e665fd66e
commit 19aeabd86d
4 changed files with 154 additions and 3 deletions

View File

@@ -79,6 +79,15 @@ impl<P: Platform> Kernel<P> {
}
}
/// The highest priority waiting in `core`'s run queue.
pub fn highest_waiting(&self, core: CoreId) -> Option<Priority> {
self.scheduler.highest_waiting(core)
}
pub fn thread_priority(&self, tid: ThreadId) -> Option<Priority> {
self.threads.get(tid).ok().map(|t| t.priority())
}
/// What `core` should do after an IPI: keep running its thread, or
/// switch to a higher-priority one now waiting. When it has no thread
/// (it was idle, or its thread was destroyed) the caller picks the