/
OSStatReset
OSStatReset
Description
OSStatReset()
is used to reset statistical variables maintained by µC/OS-III. Specifically, the per-task maximum interrupt disable time, maximum scheduler lock time, maximum amount of time a message takes to reach a task queue, the maximum amount of time it takes a signal to reach a task and more.
Files
os.h/os_stat.c
Prototype
void OSStatReset (OS_ERR *p_err)
Arguments
p_err
is a pointer to a variable used to hold an error code:
OS_ERR_NONE
The call was successful.
Returned Value
None
Required Configuration
OS_CFG_STAT_TASK_EN
must be enabled in os_cfg.h
. Refer to µC-OS-III Configuration Manual.
Callers
Application.
Notes/Warnings
None
Example Usage
OSStatReset() example usage
void TaskX (void *p_arg) { OS_ERR err; (void)&p_arg; while (DEF_ON) { : : if (statistics reset switch is pressed) { OSStatReset(&err); /* Check "err" */ : : } : : } }
Related content
OSStatTaskHook
OSStatTaskHook
More like this
OSStatTaskCPUUsageInit
OSStatTaskCPUUsageInit
More like this
OSTaskTimeQuantaSet
OSTaskTimeQuantaSet
More like this
OSTaskSuspend
OSTaskSuspend
Read with this
OSSchedRoundRobinYield
OSSchedRoundRobinYield
More like this
OSSchedRoundRobinCfg
OSSchedRoundRobinCfg
More like this