FreeRTOS: add mutex hold count to task status info
This commit is contained in:
parent
0137aef471
commit
95e43fc2c4
2 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,7 @@ typedef struct xTASK_STATUS
|
|||
eTaskState eCurrentState; /*!< The state in which the task existed when the structure was populated. */
|
||||
UBaseType_t uxCurrentPriority; /*!< The priority at which the task was running (may be inherited) when the structure was populated. */
|
||||
UBaseType_t uxBasePriority; /*!< The priority to which the task will return if the task's current priority has been inherited to avoid unbounded priority inversion when obtaining a mutex. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
|
||||
UBaseType_t uxMutexesHeld; /*!< The number of mutexes currently held by the task. Only valid if configUSE_MUTEXES is defined as 1 in FreeRTOSConfig.h. */
|
||||
uint32_t ulRunTimeCounter; /*!< The total run time allocated to the task so far, as defined by the run time stats clock. See http://www.freertos.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */
|
||||
StackType_t *pxStackBase; /*!< Points to the lowest address of the task's stack area. */
|
||||
uint32_t usStackHighWaterMark; /*!< The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */
|
||||
|
|
|
@ -3763,10 +3763,12 @@ BaseType_t xTaskGetAffinity( TaskHandle_t xTask )
|
|||
#if ( configUSE_MUTEXES == 1 )
|
||||
{
|
||||
pxTaskStatusArray[ uxTask ].uxBasePriority = pxNextTCB->uxBasePriority;
|
||||
pxTaskStatusArray[ uxTask ].uxMutexesHeld = pxNextTCB->uxMutexesHeld;
|
||||
}
|
||||
#else
|
||||
{
|
||||
pxTaskStatusArray[ uxTask ].uxBasePriority = 0;
|
||||
pxTaskStatusArray[ uxTask ].uxMutexesHeld = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue