Function scheduler::schedule

pub fn schedule() -> bool
Expand description

Re-exports for convenience and legacy compatibility. Yields the current CPU by selecting a new Task to run next, and then switches to that new Task.

The new “next” Task to run will be selected by the currently-active scheduler policy.

Preemption will be disabled while this function runs, but interrupts are not disabled because it is not necessary.

Return

  • true if a new task was selected and switched to.
  • false if no new task was selected, meaning the current task will continue running.