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:
Richard Barry 2013-11-24 10:11:16 +00:00
parent 5037ecdc5c
commit d2c2e3ca68
5 changed files with 62 additions and 31 deletions

View file

@ -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