Skip to content

Commit 6f06046

Browse files
committed
Update core ID before getting locks in prvCheckForRunStateChange()
1 parent 11ee86a commit 6f06046

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
@@ -853,9 +853,10 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
853853
* its run state. */
854854

855855
portDISABLE_INTERRUPTS();
856+
857+
xCoreID = ( BaseType_t ) portGET_CORE_ID();
856858
portGET_TASK_LOCK( xCoreID );
857859
portGET_ISR_LOCK( xCoreID );
858-
xCoreID = ( BaseType_t ) portGET_CORE_ID();
859860

860861
portSET_CRITICAL_NESTING_COUNT( xCoreID, uxPrevCriticalNesting );
861862

0 commit comments

Comments
 (0)