Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
cpu_load.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Macros

#define CPU_LOAD_PERMILLE_TO_PERCENT(permille)
 Convert a per mille CPU load value to whole percent.

Typedefs

typedef void(* cpu_load_cb_t) (uint8_t percent)

Functions

int cpu_load_get_cpu (unsigned int cpu_id, bool reset)
 Get CPU load for a specific CPU.
int cpu_load_get (bool reset)
 Get CPU load for the current CPU.
void cpu_load_on_enter_idle (void)
 Hook called on entering CPU idle.
void cpu_load_on_exit_idle (void)
 Hook called on exiting CPU idle.
void cpu_load_log_control (bool enable)
 Control periodic CPU load report.
int cpu_load_cb_reg (cpu_load_cb_t cb, uint8_t threshold_percent)
 Optional registration of callback when load is greater or equal to the threshold.
static int cpu_load_metric_get (int cpu_id)
 Get CPU load as a percentage for a specific CPU.