-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vTaskListTasks() prints core affinity mask #850
vTaskListTasks() prints core affinity mask #850
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #850 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 6 6
Lines 2549 2549
Branches 608 608
=======================================
Hits 2387 2387
Misses 107 107
Partials 55 55
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @Dazza0, thank you for taking the time to contribute to FreeRTOS.
The PR looks good to me, I am approving it with a minor comment.
( 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. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are casting this to (unsigned int)
then in the string, should it not be %u
instead of %x
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AniruddhaKanhere I purposely made it %x
instead of %u
for readability/display reasons. uxCoreAffinityMask
stores a bit mask, thus it would be more useful for users to read its value in hex.
Note: I've added a leading 0x
in the string format to make it clear it's a hex value.
This commit updates vTaskListTasks so that it prints uxCoreAffinityMask if core affinity is enabled in configuration.
fb45215
be31748
to
fb45215
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @Dazza0,
Thank you for your response. It makes sense to me.
Also, thank you for making the 0x
change.
The pull request looks good to me.
This commit updates vTaskListTasks so that it prints uxCoreAffinityMask if core affinity is enabled in configuration.
Description
Update
vTaskListTasks()
so that it printsuxCoreAffinityMask
if SMP and core affinity masks are enabled. Given thatvTaskListTasks()
is commonly called in Demo applications, it would be worthwhile printing the core affinity mask for any future SMP FreeRTOS demos.Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.