Kernel Statistic API#

OSStatReset()#

Description#

Called by your application to reset the statistics.

Files#

os.h/os_stat.c

Prototype#

void  OSStatReset (RTOS_ERR  *p_err)

Arguments#

p_err

Pointer to the variable that will receive one of the following error code(s) from this function:

  • RTOS_ERR_NONE

Returned Value#

None.

Notes / Warnings#

None.

OSStatTaskCPUUsageInit()#

Description#

Establishes CPU usage by first determining how high a 32-bit counter would count to in 1/10 of a second if no other tasks were ready to execute during that time. CPU usage is determined by a low priority task which keeps track of this 32-bit counter every second, but this time, with other tasks running. CPU usage is determined by:

OS_Stat_IdleCtrCPU Usage (%) = 100 \* (1 - ------------------) OS_Stat_IdleCtrMax

Files#

os.h/os_stat.c

Prototype#

void  OSStatTaskCPUUsageInit (RTOS_ERR  *p_err)

Arguments#

p_err

Pointer to the variable that will receive one of the following error code(s) from this function:

  • RTOS_ERR_NONE

  • RTOS_ERR_WOULD_OVF

  • RTOS_ERR_OS

  • RTOS_ERR_INVALID_ARG

  • RTOS_ERR_NOT_READY

  • RTOS_ERR_INVALID_STATE

  • RTOS_ERR_OS_SCHED_LOCKED

Returned Value#

None.

Notes / Warnings#

None.