mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-19 19:27:45 -04:00
Add additional asserts() to ensure certain operations are not performed when the scheduler is suspended.
Change the xBlockTime variables in event_groups.c/h to xTicksToWait to match the naming in other core FreeRTOS files.
This commit is contained in:
parent
5037ecdc5c
commit
d2c2e3ca68
5 changed files with 62 additions and 31 deletions
|
@ -683,6 +683,7 @@ tskTCB * pxNewTCB;
|
|||
{
|
||||
if( pxTCB == pxCurrentTCB )
|
||||
{
|
||||
configASSERT( uxSchedulerSuspended == 0 );
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
}
|
||||
|
@ -700,6 +701,7 @@ tskTCB * pxNewTCB;
|
|||
|
||||
configASSERT( pxPreviousWakeTime );
|
||||
configASSERT( ( xTimeIncrement > 0U ) );
|
||||
configASSERT( uxSchedulerSuspended == 0 );
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
@ -774,9 +776,11 @@ tskTCB * pxNewTCB;
|
|||
portTickType xTimeToWake;
|
||||
signed portBASE_TYPE xAlreadyYielded = pdFALSE;
|
||||
|
||||
|
||||
/* A delay time of zero just forces a reschedule. */
|
||||
if( xTicksToDelay > ( portTickType ) 0U )
|
||||
{
|
||||
configASSERT( uxSchedulerSuspended == 0 );
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
traceTASK_DELAY();
|
||||
|
@ -1075,6 +1079,7 @@ tskTCB * pxNewTCB;
|
|||
if( xSchedulerRunning != pdFALSE )
|
||||
{
|
||||
/* The current task has just been suspended. */
|
||||
configASSERT( uxSchedulerSuspended == 0 );
|
||||
portYIELD_WITHIN_API();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue