Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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++ )
{
Expand Down