Merge branch 'contrib/github_pr_13022_v5.1' into 'release/v5.1'

fix(freertos): Fix broken portable macro portTRY_ENTER_CRITICAL_SAFE() (v5.1)

See merge request espressif/esp-idf!30317
This commit is contained in:
Jiang Jiang Jian 2024-06-03 10:27:00 +08:00
commit 8d296506b5
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 -------------------------

View File

@ -197,7 +197,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
@ -464,7 +464,7 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void);
#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)