...
Files
os.h/os_stat.c
Prototype
Code Block |
---|
void OSStatTaskCPUUsageInit (OS_ERR *p_err) |
Arguments
p_err
is a pointer to a variable used to hold an error code:
...
Notes/Warnings
None
Example Usage
Code Block | ||
---|---|---|
| ||
void FirstAndOnlyTask (void *p_arg)
{
OS_ERR err;
:
:
#if OS_CFG_TASK_STAT_EN == DEF_ENABLED
OSStatTaskCPUUsageInit(&err); /* Compute CPU capacity with no task running */
#endif
:
OSTaskCreate(_); /* Create the other tasks */
OSTaskCreate(_);
:
while (DEF_ON) {
:
:
}
} |