diff --git a/tasks.c b/tasks.c index a2af54d59..4090f445b 100644 --- a/tasks.c +++ b/tasks.c @@ -3855,6 +3855,7 @@ void vTaskSuspendAll( void ) #else /* #if ( configNUMBER_OF_CORES == 1 ) */ { UBaseType_t ulState; + BaseType_t xCoreID; /* This must only be called from within a task. */ portASSERT_IF_IN_ISR(); @@ -3868,7 +3869,7 @@ void vTaskSuspendAll( void ) * uxSchedulerSuspended since that will prevent context switches. */ ulState = portSET_INTERRUPT_MASK(); - BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID(); + xCoreID = ( BaseType_t ) portGET_CORE_ID(); /* This must never be called from inside a critical section. */ configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 );