mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04: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;
|
UBaseType_t uxPrevCriticalNesting;
|
||||||
const TCB_t * pxThisTCB;
|
const TCB_t * pxThisTCB;
|
||||||
|
|
||||||
/* This should be skipped if called from an ISR. If the task on the current
|
/* This must only be called from within a task. */
|
||||||
* core is no longer running, then vTaskSwitchContext() probably should
|
portASSERT_IF_IN_ISR();
|
||||||
* 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 function is always called with interrupts disabled
|
/* This function is always called with interrupts disabled
|
||||||
* so this is safe. */
|
* so this is safe. */
|
||||||
pxThisTCB = pxCurrentTCBs[ portGET_CORE_ID() ];
|
pxThisTCB = pxCurrentTCBs[ portGET_CORE_ID() ];
|
||||||
|
@ -751,7 +748,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif /* #if ( configNUMBER_OF_CORES > 1 ) */
|
#endif /* #if ( configNUMBER_OF_CORES > 1 ) */
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in a new issue