Expand description
Zero-allocation waker using atomic priority bitmaps.
Each task has a (priority, index_in_priority) pair. When a waker fires,
it atomically sets the corresponding bit in the per-priority queue and
the global ready bitmap. The executor finds the next task in O(1) using
leading_zeros on the bitmap.
Functions§
- broadcast_
reschedule - Kick every other hart so an executor idling in
wfi/waition a different core notices new ready work. Exposed separately fromwake_taskso a caller waking several tasks in one batch (e.g.timer::poll_timersscanning every expired deadline inside one critical section) can broadcast once instead of once per task. - reset
- Reset the waker state (for testing).
- task_
waker - Create a
Wakerfor the task identified byid. - wake_
task - Mark
idready and broadcast a reschedule request to every other hart.