From 052e364686b1cf7082b8979fecf211121402bf74 Mon Sep 17 00:00:00 2001 From: "R. Dunbar Poor" Date: Thu, 18 Nov 2021 14:38:41 -0800 Subject: [PATCH] Fix #415: Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0 (#416) * Fix #415: Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0 --- tasks.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks.c b/tasks.c index 5702e4e5b..eff0eff0d 100644 --- a/tasks.c +++ b/tasks.c @@ -527,7 +527,9 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, */ static void prvResetNextTaskUnblockTime( void ) PRIVILEGED_FUNCTION; -#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) ) +#if ( ( ( configUSE_TRACE_FACILITY == 1 ) || ( configGENERATE_RUN_TIME_STATS == 1 ) ) && \ + ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) && \ + ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) /* * Helper function used to pad task names with spaces when printing out @@ -4376,7 +4378,9 @@ static void prvResetNextTaskUnblockTime( void ) #endif /* portCRITICAL_NESTING_IN_TCB */ /*-----------------------------------------------------------*/ -#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) ) +#if ( ( ( configUSE_TRACE_FACILITY == 1 ) || ( configGENERATE_RUN_TIME_STATS == 1 ) ) && \ + ( configUSE_STATS_FORMATTING_FUNCTIONS > 0 ) && \ + ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) static char * prvWriteNameToBuffer( char * pcBuffer, const char * pcTaskName )