cortex-gnat-rts icon indicating copy to clipboard operation
cortex-gnat-rts copied to clipboard

Indicating that context switch is required from ISR

Open simonjwright opened this issue 4 years ago • 1 comments

In freertos_bindings.c, _gnat_yield_from_isr() calls portEND_SWITCHING_ISR(), but there’s a suggestion on the FreeRTOS forums that portYIELD_FROM_ISR() would be appropriate.

simonjwright avatar Oct 30 '20 20:10 simonjwright

The FAQ on ISRs says

Each RTOS port provides a macro to request a context switch from within an ISR. The name of the macro is dependent on the port (for historic reasons). It will be either portYIELD_FROM_ISR() or portEND_SWITCHING_ISR.

The ARM CM ports I’ve looked at define

#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )

so no worries; but the hint above indicates that maybe portYIELD_FROM_ISR() would be better. At least the name matches.

simonjwright avatar Oct 30 '20 20:10 simonjwright