This commit is contained in:
2026-03-24 13:40:43 +00:00
parent 1a782cbb5c
commit a199857280
32 changed files with 118 additions and 463 deletions
@@ -42,11 +42,14 @@ impl Scheduler {
self.ready_queue.pop_front()
}
#[cfg(test)]
pub fn is_ready_empty(&self) -> bool { self.ready_queue.is_empty() }
#[cfg(test)]
pub fn ready_len(&self) -> usize { self.ready_queue.len() }
// ---------- Current tracking (no switching here) ----------
pub fn set_current(&mut self, coro: Option<HeapRef>) { self.current = coro; }
#[cfg(test)]
pub fn current(&self) -> Option<HeapRef> { self.current }
pub fn clear_current(&mut self) { self.current = None; }