mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Declare xCoreID outside if statement
This commit is contained in:
parent
54c5a9695b
commit
09329acb27
3
tasks.c
3
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 );
|
||||
|
|
Loading…
Reference in a new issue