From c8953a68cd980a6b9979312eb20c85ee3149ab99 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Wed, 19 Feb 2014 13:08:34 +0000 Subject: [PATCH] Add extra #error message as a configuration sanity check. --- FreeRTOS/Source/tasks.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index 8773c356cf..8512e1bbc6 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -1290,7 +1290,7 @@ TCB_t * pxNewTCB; /* Has the task already been resumed from within an ISR? */ if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) == pdFALSE ) { - /* Is it in the suspended list because it is in the Suspended + /* Is it in the suspended list because it is in the Suspended state, or because is is blocked with no timeout? */ if( listIS_CONTAINED_WITHIN( NULL, &( pxTCB->xEventListItem ) ) != pdFALSE ) { @@ -2339,7 +2339,7 @@ BaseType_t xReturn; called from a critical section within an ISR. */ /* The event list is sorted in priority order, so the first in the list can - be removed as it is known to be the highest priority. Remove the TCB from + be removed as it is known to be the highest priority. Remove the TCB from the delayed list, and add it to the ready list. If an event is for a queue that is locked then this function will never @@ -3419,6 +3419,12 @@ TCB_t *pxTCB; volatile UBaseType_t uxArraySize, x; uint32_t ulTotalTime, ulStatsAsPercentage; + #if( configUSE_TRACE_FACILITY != 1 ) + { + #error configUSE_TRACE_FACILITY must also be set to 1 in FreeRTOSConfig.h to use vTaskGetRunTimeStats(). + } + #endif + /* * PLEASE NOTE: *