diff --git a/tasks.c b/tasks.c index e0fc15bcc65..bea306ea512 100644 --- a/tasks.c +++ b/tasks.c @@ -2462,12 +2462,12 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, UBaseType_t uxCurrentBasePriority, uxPriorityUsedOnEntry; BaseType_t xYieldRequired = pdFALSE; - traceENTER_vTaskPrioritySet( xTask, uxNewPriority ); - #if ( configNUMBER_OF_CORES > 1 ) BaseType_t xYieldForTask = pdFALSE; #endif + traceENTER_vTaskPrioritySet( xTask, uxNewPriority ); + configASSERT( uxNewPriority < configMAX_PRIORITIES ); /* Ensure the new priority is valid. */ @@ -4376,12 +4376,12 @@ BaseType_t xTaskIncrementTick( void ) TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; - traceENTER_xTaskIncrementTick(); - #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) BaseType_t xYieldRequiredForCore[ configNUMBER_OF_CORES ] = { pdFALSE }; #endif /* #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) */ + traceENTER_xTaskIncrementTick(); + /* Called by the portable layer each time a tick interrupt occurs. * Increments the tick then checks to see if the new tick value will cause any * tasks to be unblocked. */ @@ -5566,10 +5566,10 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters ) const UBaseType_t uxNonApplicationTasks = 1; #endif /* INCLUDE_vTaskSuspend */ - traceENTER_eTaskConfirmSleepModeStatus(); - eSleepModeStatus eReturn = eStandardSleep; + traceENTER_eTaskConfirmSleepModeStatus(); + /* This function must be called from a critical section. */ if( listCURRENT_LIST_LENGTH( &xPendingReadyList ) != 0 )