mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-08 15:17:50 -04:00
Add title for each column in the table from vTaskListTasks
The task table returned by vTaskListTasks is human readable. But it misses a description for each column. Add a title row for better human readability.
This commit is contained in:
parent
f31787d35d
commit
8af2c13b83
1 changed files with 13 additions and 1 deletions
14
tasks.c
14
tasks.c
|
@ -141,7 +141,7 @@
|
|||
#define tskREADY_CHAR ( 'R' )
|
||||
#define tskDELETED_CHAR ( 'D' )
|
||||
#define tskSUSPENDED_CHAR ( 'S' )
|
||||
|
||||
#define tskTITLE_STR "TaskName State Priority WaterMark TaskID"
|
||||
/*
|
||||
* Some kernel aware debuggers require the data the debugger needs access to be
|
||||
* global, rather than file scope.
|
||||
|
@ -7312,6 +7312,18 @@ static void prvResetNextTaskUnblockTime( void )
|
|||
/* Generate the (binary) data. */
|
||||
uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, NULL );
|
||||
|
||||
/* Create title for each column of task table */
|
||||
if (uxArraySize > 0)
|
||||
{
|
||||
iSnprintfReturnValue = snprintf(pcWriteBuffer,
|
||||
uxBufferLength - uxConsumedBufferLength,
|
||||
"%s\r\n",
|
||||
tskTITLE_STR);
|
||||
uxCharsWrittenBySnprintf = prvSnprintfReturnValueToCharsWritten(iSnprintfReturnValue, uxBufferLength - uxConsumedBufferLength);
|
||||
uxConsumedBufferLength += uxCharsWrittenBySnprintf;
|
||||
pcWriteBuffer += uxCharsWrittenBySnprintf;
|
||||
}
|
||||
|
||||
/* Create a human readable table from the binary data. */
|
||||
for( x = 0; x < uxArraySize; x++ )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue