diff --git a/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h index 9794c7346b..c33b775a85 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h @@ -142,7 +142,7 @@ typedef uint32_t TickType_t; UBaseType_t xPortSetInterruptMaskFromISR(void); /** - * @brief Reenable interrupts in a nested manner (meant to be called from ISRs) + * @brief Re-enable interrupts in a nested manner (meant to be called from ISRs) * * @warning Only applies to current CPU. * @param prev_int_level Previous interrupt level @@ -502,7 +502,7 @@ void vPortTCBPreDeleteHook( void *pxTCB ); #define portENTER_CRITICAL_ISR(mux) vPortEnterCriticalMultiCore(mux) #define portEXIT_CRITICAL_ISR(mux) vPortExitCriticalMultiCore(mux) -#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) xPortEnterCriticalTimeoutSafe(mux) +#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) xPortEnterCriticalTimeoutSafe(mux, timeout) #define portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux) #define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux) #else @@ -536,7 +536,12 @@ void vPortTCBPreDeleteHook( void *pxTCB ); portEXIT_CRITICAL(mux); \ } \ }) -#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) portENTER_CRITICAL_SAFE(mux, timeout) +#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) ({ \ + (void)timeout; \ + portENTER_CRITICAL_SAFE(mux); \ + BaseType_t ret = pdPASS; \ + ret; \ +}) #endif /* (configNUM_CORES > 1) */ diff --git a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h index cdb1ddc9ef..91085eb1a9 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h @@ -172,7 +172,7 @@ BaseType_t xPortInterruptedFromISRContext(void); static inline UBaseType_t xPortSetInterruptMaskFromISR(void); /** - * @brief Reenable interrupts in a nested manner (meant to be called from ISRs) + * @brief Re-enable interrupts in a nested manner (meant to be called from ISRs) * * @warning Only applies to current CPU. * @param prev_level Previous interrupt level @@ -460,7 +460,7 @@ void vPortTCBPreDeleteHook( void *pxTCB ); #define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux) #define portEXIT_CRITICAL_ISR(mux) vPortExitCritical(mux) -#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) xPortEnterCriticalTimeoutSafe(mux) +#define portTRY_ENTER_CRITICAL_SAFE(mux, timeout) xPortEnterCriticalTimeoutSafe(mux, timeout) #define portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux) #define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux)