Просмотр исходного кода

fix(freertos): taskCAN_BE_SCHEDULED macro parenthesis

This commit adds missing parenthesis around the taskCAN_BE_SCHEDULED macro so
that it can properly used with a negation operator.
Darian Leung 2 лет назад
Родитель
Сommit
fdcab76128
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      components/freertos/FreeRTOS-Kernel/tasks.c

+ 2 - 2
components/freertos/FreeRTOS-Kernel/tasks.c

@@ -294,8 +294,8 @@
  */
 #if ( configNUM_CORES > 1 )
     #define taskCAN_BE_SCHEDULED( pxTCB )                                                                           \
-    ( ( pxTCB->xCoreID != tskNO_AFFINITY ) ) ? ( uxSchedulerSuspended[ pxTCB->xCoreID ] == ( UBaseType_t ) 0U ) :   \
-    ( ( uxSchedulerSuspended[ 0 ] == ( UBaseType_t ) 0U ) || ( uxSchedulerSuspended[ 1 ] == ( UBaseType_t ) 0U ) )
+    ( ( ( pxTCB->xCoreID != tskNO_AFFINITY ) ) ? ( uxSchedulerSuspended[ pxTCB->xCoreID ] == ( UBaseType_t ) 0U ) : \
+    ( ( uxSchedulerSuspended[ 0 ] == ( UBaseType_t ) 0U ) || ( uxSchedulerSuspended[ 1 ] == ( UBaseType_t ) 0U ) ) )
 #else
     #define taskCAN_BE_SCHEDULED( pxTCB )    ( ( uxSchedulerSuspended[ 0 ] == ( UBaseType_t ) 0U ) )
 #endif /* configNUM_CORES > 1 */