mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-07-04 19:08:48 +02:00
Assert if prvCheckForRunStateChange is called in ISR (#779)
* Assert if prvCheckForRunStateChange is called in ISR
This commit is contained in:
parent
288d143357
commit
53229b1537
10
tasks.c
10
tasks.c
@ -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…
x
Reference in New Issue
Block a user