mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-27 09:38:16 +00:00
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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user