Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchinglee-iot <61685396+chinglee-iot@users.noreply.github.com>2023-10-05 09:46:38 +0300
committerGitHub <noreply@github.com>2023-10-05 09:46:38 +0300
commit317bc0c89c2b8b1a8b01fcec83827092993e1e30 (patch)
tree1bcae64f5b775bf93708ee471f7f39e2b1c7590f /tasks.c
parent30e13dac2bd97b7c1429cdead03406d94a83a042 (diff)
Move trace macro after declaration (#820)
* Move trace macro after declaration to comply with ISO C90
Diffstat (limited to 'tasks.c')
-rw-r--r--tasks.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tasks.c b/tasks.c
index e0fc15bcc..bea306ea5 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 )