mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos(SMP): Fix SMP FreeRTOS RISC-V statement expression macro
Macros that need to reteurn a value should use GCC statement expression macro syntax. This commit fixes the portTRY_ENTER_CRITICAL() in the RISC-V port of SMP FreeRTOS to be a statement expression macro.
This commit is contained in:
parent
cce1f9dee4
commit
623f20d2b5
@ -256,11 +256,11 @@ void vPortEnterCritical(void);
|
||||
void vPortExitCritical(void);
|
||||
|
||||
//IDF task critical sections
|
||||
#define portTRY_ENTER_CRITICAL(lock, timeout) {((void) lock; (void) timeout; vPortEnterCritical(); pdPASS;)}
|
||||
#define portTRY_ENTER_CRITICAL(lock, timeout) ({(void) lock; (void) timeout; vPortEnterCritical(); pdPASS;})
|
||||
#define portENTER_CRITICAL_IDF(lock) ({(void) lock; vPortEnterCritical();})
|
||||
#define portEXIT_CRITICAL_IDF(lock) ({(void) lock; vPortExitCritical();})
|
||||
//IDF ISR critical sections
|
||||
#define portTRY_ENTER_CRITICAL_ISR(lock, timeout) {((void) lock; (void) timeout; vPortEnterCritical(); pdPASS;)}
|
||||
#define portTRY_ENTER_CRITICAL_ISR(lock, timeout) ({(void) lock; (void) timeout; vPortEnterCritical(); pdPASS;})
|
||||
#define portENTER_CRITICAL_ISR(lock) ({(void) lock; vPortEnterCritical();})
|
||||
#define portEXIT_CRITICAL_ISR(lock) ({(void) lock; vPortExitCritical();})
|
||||
//IDF safe critical sections (they're the same)
|
||||
|
Loading…
x
Reference in New Issue
Block a user