mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
vTaskListTasks prints core affinity mask (#850)
This commit updates vTaskListTasks so that it prints uxCoreAffinityMask if core affinity is enabled in configuration.
This commit is contained in:
parent
a8650b99a3
commit
4ef0bb676c
25
tasks.c
25
tasks.c
|
@ -7225,13 +7225,24 @@ static void prvResetNextTaskUnblockTime( void )
|
||||||
if( uxConsumedBufferLength < ( uxBufferLength - 1 ) )
|
if( uxConsumedBufferLength < ( uxBufferLength - 1 ) )
|
||||||
{
|
{
|
||||||
/* Write the rest of the string. */
|
/* Write the rest of the string. */
|
||||||
iSnprintfReturnValue = snprintf( pcWriteBuffer,
|
#if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
|
||||||
uxBufferLength - uxConsumedBufferLength,
|
iSnprintfReturnValue = snprintf( pcWriteBuffer,
|
||||||
"\t%c\t%u\t%u\t%u\r\n",
|
uxBufferLength - uxConsumedBufferLength,
|
||||||
cStatus,
|
"\t%c\t%u\t%u\t%u\t0x%x\r\n",
|
||||||
( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority,
|
cStatus,
|
||||||
( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark,
|
( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority,
|
||||||
( 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. */
|
( unsigned int ) pxTaskStatusArray[ x ].usStackHighWaterMark,
|
||||||
|
( unsigned int ) pxTaskStatusArray[ x ].xTaskNumber,
|
||||||
|
( unsigned int ) pxTaskStatusArray[ x ].uxCoreAffinityMask ); /*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 /* ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
|
||||||
|
iSnprintfReturnValue = snprintf( pcWriteBuffer,
|
||||||
|
uxBufferLength - uxConsumedBufferLength,
|
||||||
|
"\t%c\t%u\t%u\t%u\r\n",
|
||||||
|
cStatus,
|
||||||
|
( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority,
|
||||||
|
( 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. */
|
||||||
|
#endif /* ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) ) */
|
||||||
uxCharsWrittenBySnprintf = prvSnprintfReturnValueToCharsWritten( iSnprintfReturnValue, uxBufferLength - uxConsumedBufferLength );
|
uxCharsWrittenBySnprintf = prvSnprintfReturnValueToCharsWritten( iSnprintfReturnValue, uxBufferLength - uxConsumedBufferLength );
|
||||||
|
|
||||||
uxConsumedBufferLength += uxCharsWrittenBySnprintf;
|
uxConsumedBufferLength += uxCharsWrittenBySnprintf;
|
||||||
|
|
Loading…
Reference in a new issue