Skip to content

Commit

Permalink
Merge branch 'bugfix/freertos_task_noaffinity_print' into 'master'
Browse files Browse the repository at this point in the history
fix(freertos): display tasks with no affinity as -1 during tracing

Closes IDFGH-11759

See merge request espressif/esp-idf!28073
  • Loading branch information
o-marshmallow committed Dec 26, 2023
2 parents ee3a46d + 1472343 commit 227c5d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/freertos/FreeRTOS-Kernel/tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -5440,7 +5440,8 @@ static void prvResetNextTaskUnblockTime( void )
/* Write the rest of the string. */
#if ( configTASKLIST_INCLUDE_COREID == 1 )
{
sprintf( pcWriteBuffer, "\t%c\t%u\t%d\t%u\t%u\r\n", cStatus, ( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority, ( unsigned int ) pxTaskStatusArray[ x ].xCoreID, ( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark, ( unsigned int ) pxTaskStatusArray[ x ].xTaskNumber ); /*lint !e586 sprintf() allowed as this is compiled with many compilers and this is a utility function only - not part of the core kernel implementation. */
const BaseType_t xCoreID = ( pxTaskStatusArray[ x ].xCoreID == tskNO_AFFINITY ) ? -1 : pxTaskStatusArray[ x ].xCoreID ;
sprintf( pcWriteBuffer, "\t%c\t%u\t%d\t%u\t%u\r\n", cStatus, ( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority, ( int ) xCoreID, ( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark, ( unsigned int ) pxTaskStatusArray[ x ].xTaskNumber ); /*lint !e586 sprintf() allowed as this is compiled with many compilers and this is a utility function only - not part of the core kernel implementation. */
}
#else /* configTASKLIST_INCLUDE_COREID == 1 */
{
Expand Down

0 comments on commit 227c5d2

Please sign in to comment.