From c53a6b05477c34dbfb02a7eadd5ee518469125fd Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Mon, 12 Jan 2026 00:58:27 -0600 Subject: [PATCH] RP2040: Add xPortIsInsideInterrupt to match other ARM ports (#1356) Co-authored-by: graham sanderson --- portable/ThirdParty/GCC/RP2040/include/portmacro.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/portable/ThirdParty/GCC/RP2040/include/portmacro.h b/portable/ThirdParty/GCC/RP2040/include/portmacro.h index 3e54f384f..68686f810 100644 --- a/portable/ThirdParty/GCC/RP2040/include/portmacro.h +++ b/portable/ThirdParty/GCC/RP2040/include/portmacro.h @@ -149,6 +149,10 @@ extern void vPortYield( void ); __asm volatile ( "mrs %0, IPSR" : "=r" ( ulIPSR )::); \ ( ( uint8_t ) ulIPSR ) > 0; } ) +/* Use #define rather than inline method to make it easier for user code + * to work with kernel versions both with and without xPortIsInsideInterrupt */ +#define xPortIsInsideInterrupt() ((BaseType_t)portCHECK_IF_IN_ISR()) + void vYieldCore( int xCoreID ); #define portYIELD_CORE( a ) vYieldCore( a )