Skip to main content

set_isr_yielder

Function set_isr_yielder 

Source
#[unsafe(link_section = ".iram1.interrupt_set_isr_yielder")]
pub unsafe fn set_isr_yielder( yielder: Option<(unsafe fn(*mut ()), *mut ())>, ) -> Option<(unsafe fn(*mut ()), *mut ())>
Expand description

ยงSafety

This function should only be called from within an ISR handler, so as to set a custom ISR yield function (e.g. when using the ESP-IDF timer service).

Thus, if some function further down the ISR call chain invokes do_yield, the custom yield function set here will be called.

Users should not forget to call again set_isr_yielder at the end of the ISR handler so as to reastore the yield function which was valid before the ISR handler was invoked.