fix: sched round-robin, cap slot OOB panic, clippy, make ci

- RunList -> intrusive FIFO, no starvation, no silent drop
- cap table sized to CapSlot range (kani caught OOB panic)
- snake food color test uses const
- kani cfg lint, RUST_MIN_STACK for big kernel struct in tests
This commit is contained in:
2026-10-26 19:08:30 +01:00
parent 1c04ddf909
commit e931485ca7
32 changed files with 384 additions and 251 deletions

View File

@@ -29,12 +29,12 @@ impl PerCoreScheduler {
self.queue.add(thread, priority);
}
pub fn remove(&mut self, thread: ThreadId, priority: Priority) {
self.queue.remove(thread, priority);
pub fn remove(&mut self, thread: ThreadId) {
self.queue.remove(thread);
}
pub fn pick_next(&mut self) -> Option<ThreadId> {
let (thread, _priority) = self.queue.next()?;
let (thread, _priority) = self.queue.pop_highest()?;
self.current = Some(thread);
Some(thread)
}
@@ -56,6 +56,10 @@ impl PerCoreScheduler {
}
pub fn len(&self) -> usize {
self.queue.bitmap().count_ones() as usize
self.queue.len()
}
pub fn is_empty(&self) -> bool {
self.queue.is_empty()
}
}