Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRTOS/FreeRTOS-Kernel.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarian <32921628+Dazza0@users.noreply.github.com>2023-10-26 00:45:03 +0300
committerGitHub <noreply@github.com>2023-10-26 00:45:03 +0300
commit4ef0bb676cd4114ab21d21d03f31b4eb17d97a70 (patch)
tree52f9e89d907fa3ea8bced9417766478e37cd5cbc
parenta8650b99a33cd6fbc557748ef719e0229296676d (diff)
vTaskListTasks prints core affinity mask (#850)
This commit updates vTaskListTasks so that it prints uxCoreAffinityMask if core affinity is enabled in configuration.
-rw-r--r--tasks.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/tasks.c b/tasks.c
index d74a4ccac..2e1cce402 100644
--- a/tasks.c
+++ b/tasks.c
@@ -7225,13 +7225,24 @@ static void prvResetNextTaskUnblockTime( void )
if( uxConsumedBufferLength < ( uxBufferLength - 1 ) )
{
/* Write the rest of the string. */
- 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. */
+ #if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
+ iSnprintfReturnValue = snprintf( pcWriteBuffer,
+ uxBufferLength - uxConsumedBufferLength,
+ "\t%c\t%u\t%u\t%u\t0x%x\r\n",
+ cStatus,
+ ( unsigned int ) pxTaskStatusArray[ x ].uxCurrentPriority,
+ ( 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 );
uxConsumedBufferLength += uxCharsWrittenBySnprintf;