mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-18 12:07:46 -04:00
Add support for retrieving a task's uxCoreAffinityMask with the vTaskGetInfo() API (#574)
* Add support for retrieving a task's uxCoreAffinityMask with the vTaskGetInfo() API This commit adds support for retrieving the task's core affinity mask when SMP is used for more than 1 cores and configUSE_CORE_AFFINITY is enabled. Signed-off-by: Sudeep Mohanty <sudp.mohanty@gmail.com> * Apply suggestions from code review Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Signed-off-by: Sudeep Mohanty <sudp.mohanty@gmail.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
parent
13f034eb74
commit
8128208bde
2 changed files with 9 additions and 0 deletions
6
tasks.c
6
tasks.c
|
@ -4708,6 +4708,12 @@ static void prvCheckTasksWaitingTermination( void )
|
|||
pxTaskStatus->pxStackBase = pxTCB->pxStack;
|
||||
pxTaskStatus->xTaskNumber = pxTCB->uxTCBNumber;
|
||||
|
||||
#if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUM_CORES > 1 ) )
|
||||
{
|
||||
pxTaskStatus->uxCoreAffinityMask = pxTCB->uxCoreAffinityMask;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ( configUSE_MUTEXES == 1 )
|
||||
{
|
||||
pxTaskStatus->uxBasePriority = pxTCB->uxBasePriority;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue