fix(freertos): Fix broken portable macro portTRY_ENTER_CRITICAL_SAFE()

This commit fixes a bug where the portTRY_ENTER_CRITICAL_SAFE() for the
Xtensa and RISC-V FreeRTOS ports were broken as it did not correctly use
the timeout parameter.

Merges: https://github.com/espressif/esp-idf/pull/13022
This commit is contained in:
Andy Lin
2024-01-21 04:08:54 +08:00
committed by Sudeep Mohanty
parent c432c692fa
commit b562ceb8c1
2 changed files with 8 additions and 3 deletions

View File

@@ -340,7 +340,12 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void)
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; \
})
// ---------------------- Yielding -------------------------