Skip to content

Commit

Permalink
Declare xCoreID outside if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
felixvanoost committed Dec 22, 2024
1 parent 54c5a96 commit 09329ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 );
Expand Down

0 comments on commit 09329ac

Please sign in to comment.