Skip to main content

finish_context_switch_tail

Function finish_context_switch_tail 

Source
pub fn finish_context_switch_tail() -> bool
Expand description

Withdraws the outgoing runtime context’s CPU binding after raw switch.

The incoming context calls this exactly once while local IRQs remain disabled and before the scheduler clears the outgoing thread’s on_cpu publication. The implementation must not allocate, block, invoke callbacks, consume the scheduler baton, or re-enter ax-task. It returns the deferred resource-release edge. CPU-time accounting remains owned by the runqueue clock and must not open a second time domain in the architecture switch tail. Any failure is an unrecoverable runtime invariant: the raw switch has already committed, so there is no compatibility retry path.