Add xTaskGetIdleRunTimeCounter() API function to return the run time stats counter for the idle task - useful for POSIX time implementations.

This commit is contained in:
Richard Barry 2019-01-21 23:39:48 +00:00
parent 817783d75c
commit df5952f655
11 changed files with 69 additions and 12 deletions

View file

@ -333,6 +333,19 @@ BaseType_t xRunningPrivileged = xPortRaisePrivilege();
#endif
/*-----------------------------------------------------------*/
#if( ( configGENERATE_RUN_TIME_STATS == 1 ) && ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) )
TickType_t MPU_xTaskGetIdleRunTimeCounter( void )
{
TickType_t xReturn;
BaseType_t xRunningPrivileged = xPortRaisePrivilege();
xReturn = xTaskGetIdleRunTimeCounter();
vPortResetPrivilege( xRunningPrivileged );
return xReturn;
}
#endif
/*-----------------------------------------------------------*/
#if ( configUSE_APPLICATION_TASK_TAG == 1 )
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxTagValue )
{