Skip to main content

current_preemption_pending

Function current_preemption_pending 

Source
pub fn current_preemption_pending() -> bool
Expand description

Tests the current execution context’s advisory preemption-pending state.

This is the runtime equivalent of Linux’s need_resched() safe-point query. It must read the architecture-selected current state without disabling preemption or claiming scheduler work. A false result is only a snapshot.