From 40f51fd08f01d417e4072d1762694b9aeff94b0d Mon Sep 17 00:00:00 2001 From: Kody Stribrny Date: Mon, 11 Aug 2025 14:12:43 -0700 Subject: [PATCH] Inline as a macro --- portable/MPLAB/PIC32MZ/port.c | 2 +- portable/MPLAB/PIC32MZ/portmacro.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/portable/MPLAB/PIC32MZ/port.c b/portable/MPLAB/PIC32MZ/port.c index 5d827c045..f9a88fb60 100644 --- a/portable/MPLAB/PIC32MZ/port.c +++ b/portable/MPLAB/PIC32MZ/port.c @@ -374,7 +374,7 @@ void vPortClearInterruptMaskFromISR( UBaseType_t uxSavedStatusRegister ) /*-----------------------------------------------------------*/ -__attribute__((always_inline)) BaseType_t xPortIsInsideInterrupt( void ) +portFORCE_INLINE BaseType_t xPortIsInsideInterrupt( void ) { uint32_t ulCurrentInterrupt; BaseType_t xReturn; diff --git a/portable/MPLAB/PIC32MZ/portmacro.h b/portable/MPLAB/PIC32MZ/portmacro.h index a76099e18..640173942 100644 --- a/portable/MPLAB/PIC32MZ/portmacro.h +++ b/portable/MPLAB/PIC32MZ/portmacro.h @@ -223,6 +223,10 @@ extern volatile UBaseType_t uxInterruptNesting; #define portREMOVE_STATIC_QUALIFIER #endif +#ifndef portFORCE_INLINE + #define portFORCE_INLINE __attribute__( ( always_inline ) ) +#endif + /* *INDENT-OFF* */ #ifdef __cplusplus }