Skip to content

Commit 09329ac

Browse files
committed
Declare xCoreID outside if statement
1 parent 54c5a96 commit 09329ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tasks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3855,6 +3855,7 @@ void vTaskSuspendAll( void )
38553855
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
38563856
{
38573857
UBaseType_t ulState;
3858+
BaseType_t xCoreID;
38583859

38593860
/* This must only be called from within a task. */
38603861
portASSERT_IF_IN_ISR();
@@ -3868,7 +3869,7 @@ void vTaskSuspendAll( void )
38683869
* uxSchedulerSuspended since that will prevent context switches. */
38693870
ulState = portSET_INTERRUPT_MASK();
38703871

3871-
BaseType_t xCoreID = ( BaseType_t ) portGET_CORE_ID();
3872+
xCoreID = ( BaseType_t ) portGET_CORE_ID();
38723873

38733874
/* This must never be called from inside a critical section. */
38743875
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 );

0 commit comments

Comments
 (0)