cortex-gnat-rts
cortex-gnat-rts copied to clipboard
Indicating that context switch is required from ISR
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.
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.