diff --git a/include/task.h b/include/task.h index bce2a6b8c..0331bc0ee 100644 --- a/include/task.h +++ b/include/task.h @@ -1849,8 +1849,8 @@ void vTaskList( char * pcWriteBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unq * * vTaskGetRunTimeStats() calls uxTaskGetSystemState(), then formats part of the * uxTaskGetSystemState() output into a human readable table that displays the - * amount of time each task has spent in the Running state in both absolute and - * percentage terms. + * task priority and amount of time each task has spent in the Running state + * in both absolute and percentage terms. * * vTaskGetRunTimeStats() has a dependency on the sprintf() C library function * that might bloat the code size, use a lot of stack, and provide different diff --git a/tasks.c b/tasks.c index 94b3e1f86..6fccfb3ec 100644 --- a/tasks.c +++ b/tasks.c @@ -4590,6 +4590,7 @@ static void prvResetNextTaskUnblockTime( void ) * spaces so it can be printed in tabular form more * easily. */ pcWriteBuffer = prvWriteNameToBuffer( pcWriteBuffer, pxTaskStatusArray[ x ].pcTaskName ); + pcWriteBuffer += sprintf( pcWriteBuffer, "\t\t%u", ( unsigned int ) pxTaskStatusArray[ x ].uxBasePriority ); if( ulStatsAsPercentage > 0UL ) {