Assert if prvCheckForRunStateChange is called in ISR (#779)

* Assert if prvCheckForRunStateChange is called in ISR
pull/770/head^2
chinglee-iot 1 year ago committed by GitHub
parent 288d143357
commit 53229b1537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -693,12 +693,9 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
UBaseType_t uxPrevCriticalNesting;
const TCB_t * pxThisTCB;
/* This should be skipped if called from an ISR. If the task on the current
* core is no longer running, then vTaskSwitchContext() probably should
* be run before returning, but we don't have a way to force that to happen
* from here. */
if( portCHECK_IF_IN_ISR() == pdFALSE )
{
/* This must only be called from within a task. */
portASSERT_IF_IN_ISR();
/* This function is always called with interrupts disabled
* so this is safe. */
pxThisTCB = pxCurrentTCBs[ portGET_CORE_ID() ];
@ -751,7 +748,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
}
}
}
}
#endif /* #if ( configNUMBER_OF_CORES > 1 ) */
/*-----------------------------------------------------------*/

Loading…
Cancel
Save