From fefaa5e2e77e94fd2ee4bbe0ddd782ae55f79cfa Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sat, 17 Nov 2012 19:23:30 +0000 Subject: [PATCH] Default configUSE_TICKLESS_IDLE to 0 when it is not defined. Move location of traceTASK_CREATE() macro call. Remove obsolete handling of trmCOMMAND_PROCESS_TIMER_OVERFLOW as the command was never used in release versions. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1811 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/include/FreeRTOS.h | 4 ++++ FreeRTOS/Source/tasks.c | 4 ++-- FreeRTOS/Source/timers.c | 12 +++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/FreeRTOS/Source/include/FreeRTOS.h b/FreeRTOS/Source/include/FreeRTOS.h index 2c0c28d8c..99df4acda 100644 --- a/FreeRTOS/Source/include/FreeRTOS.h +++ b/FreeRTOS/Source/include/FreeRTOS.h @@ -534,6 +534,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #define portSUPPRESS_TICKS_AND_SLEEP( xExpectedIdleTime ) #endif +#ifndef configUSE_TICKLESS_IDLE + #define configUSE_TICKLESS_IDLE 0 +#endif + #ifndef configPRE_SLEEP_PROCESSING #define configPRE_SLEEP_PROCESSING( x ) #endif diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index ec8a0520e..7bddc1ea5 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -614,12 +614,12 @@ tskTCB * pxNewTCB; } #endif uxTaskNumber++; + traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyQueue( pxNewTCB ); xReturn = pdPASS; - portSETUP_TCB( pxNewTCB ); - traceTASK_CREATE( pxNewTCB ); + portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); } diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/Source/timers.c index f8cb7f862..e68cc0341 100644 --- a/FreeRTOS/Source/timers.c +++ b/FreeRTOS/Source/timers.c @@ -520,16 +520,10 @@ portTickType xTimeNow; { pxTimer = xMessage.pxTimer; - /* Is the timer already in a list of active timers? When the command - is trmCOMMAND_PROCESS_TIMER_OVERFLOW, the timer will be NULL as the - command is to the task rather than to an individual timer. */ - if( pxTimer != NULL ) + if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) { - if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) - { - /* The timer is in a list, remove it. */ - uxListRemove( &( pxTimer->xTimerListItem ) ); - } + /* The timer is in a list, remove it. */ + uxListRemove( &( pxTimer->xTimerListItem ) ); } traceTIMER_COMMAND_RECEIVED( pxTimer, xMessage.xMessageID, xMessage.xMessageValue ); -- 2.39.5