pub fn yield_dead_task()Expand description
Force a context switch away from the current task, unconditionally.
Unlike yield_task, this function ignores the preemption guard.
It must only be called from super::task_ops::exit_current_task after:
- The task has been marked
TaskState::Dead. - All scheduler locks have been released.
- No spinlock-guarded per-CPU data is being accessed by this task.
At that point the preempt_count is irrelevant : the task will never run
again, so bypassing the guard is both safe and necessary to prevent the
dead task from spinning in a hlt() loop.