Update core ID before getting locks in prvCheckForRunStateChange()

This commit is contained in:
Felix van Oost 2024-12-21 11:50:09 -05:00
parent 11ee86a9d5
commit 6f06046998

View file

@ -853,9 +853,10 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
* its run state. */
portDISABLE_INTERRUPTS();
xCoreID = ( BaseType_t ) portGET_CORE_ID();
portGET_TASK_LOCK( xCoreID );
portGET_ISR_LOCK( xCoreID );
xCoreID = ( BaseType_t ) portGET_CORE_ID();
portSET_CRITICAL_NESTING_COUNT( xCoreID, uxPrevCriticalNesting );