mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'contrib/github_pr_13022' into 'master'
fix(freertos): Fix broken portable macro portTRY_ENTER_CRITICAL_SAFE() Closes IDFGH-11943 See merge request espressif/esp-idf!30030
This commit is contained in:
commit
5f19a8797a
@ -510,7 +510,7 @@ void vPortTCBPreDeleteHook( void *pxTCB );
|
|||||||
#define portENTER_CRITICAL_ISR(mux) vPortEnterCriticalMultiCore(mux)
|
#define portENTER_CRITICAL_ISR(mux) vPortEnterCriticalMultiCore(mux)
|
||||||
#define portEXIT_CRITICAL_ISR(mux) vPortExitCriticalMultiCore(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 portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux)
|
||||||
#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux)
|
#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux)
|
||||||
#else
|
#else
|
||||||
@ -544,7 +544,12 @@ void vPortTCBPreDeleteHook( void *pxTCB );
|
|||||||
portEXIT_CRITICAL(mux); \
|
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) */
|
#endif /* (configNUM_CORES > 1) */
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ BaseType_t xPortInterruptedFromISRContext(void);
|
|||||||
static inline UBaseType_t xPortSetInterruptMaskFromISR(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.
|
* @warning Only applies to current CPU.
|
||||||
* @param prev_level Previous interrupt level
|
* @param prev_level Previous interrupt level
|
||||||
@ -460,7 +460,7 @@ void vPortTCBPreDeleteHook( void *pxTCB );
|
|||||||
#define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux)
|
#define portENTER_CRITICAL_ISR(mux) vPortEnterCritical(mux)
|
||||||
#define portEXIT_CRITICAL_ISR(mux) vPortExitCritical(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 portENTER_CRITICAL_SAFE(mux) vPortEnterCriticalSafe(mux)
|
||||||
#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux)
|
#define portEXIT_CRITICAL_SAFE(mux) vPortExitCriticalSafe(mux)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user