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.
@@ -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)
