Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
rtos_mon_arch.c File Reference
#include "modules/core/sys_mon_rtos.h"
#include "mcu_periph/sys_time_arch.h"
#include <ch.h>
+ Include dependency graph for rtos_mon_arch.c:

Go to the source code of this file.

Data Structures

struct  rtos_mon_cpu_window
 

Functions

static uint16_t get_stack_free (const thread_t *tp)
 
static rttime_t get_thread_delta (const thread_t *tp, rttime_t current_time)
 
static uint16_t get_thread_load_x10 (rttime_t thread_ticks, rttime_t total_ticks)
 
static uint8_t get_cpu_load_percent (rttime_t idle_ticks, rttime_t total_ticks)
 
void rtos_mon_init_arch (void)
 
void rtos_mon_periodic_arch (void)
 

Variables

static struct rtos_mon_cpu_window cpu_window
 

Detailed Description

Author
Gautier Hattenberger RTOS monitoring tool ChibiOS implementation

Definition in file rtos_mon_arch.c.


Data Structure Documentation

◆ rtos_mon_cpu_window

struct rtos_mon_cpu_window

Definition at line 36 of file rtos_mon_arch.c.

Data Fields
rttime_t prev_isr_time Previous cumulative ISR counter.
uint8_t prev_stats_valid True after the first full sampling pass.
uint8_t prev_thread_count Number of valid entries in previous arrays.
thread_t * prev_thread_ref[RTOS_MON_MAX_THREADS] Previous thread identities for delta lookup.
rttime_t prev_thread_time[RTOS_MON_MAX_THREADS] Previous cumulative thread counters.
thread_t * thread_ref[RTOS_MON_MAX_THREADS] Current thread identities for matching samples.
rttime_t thread_time[RTOS_MON_MAX_THREADS] Current cumulative thread counters.

Function Documentation

◆ get_cpu_load_percent()

static uint8_t get_cpu_load_percent ( rttime_t  idle_ticks,
rttime_t  total_ticks 
)
static

Definition at line 294 of file rtos_mon_arch.c.

References foo.

Referenced by rtos_mon_periodic_arch().

+ Here is the caller graph for this function:

◆ get_stack_free()

static uint16_t get_stack_free ( const thread_t tp)
static

Definition at line 254 of file rtos_mon_arch.c.

References foo.

Referenced by rtos_mon_periodic_arch().

+ Here is the caller graph for this function:

◆ get_thread_delta()

static rttime_t get_thread_delta ( const thread_t tp,
rttime_t  current_time 
)
static

◆ get_thread_load_x10()

static uint16_t get_thread_load_x10 ( rttime_t  thread_ticks,
rttime_t  total_ticks 
)
static

Definition at line 283 of file rtos_mon_arch.c.

References foo.

Referenced by rtos_mon_periodic_arch().

+ Here is the caller graph for this function:

◆ rtos_mon_init_arch()

void rtos_mon_init_arch ( void  )

Definition at line 175 of file rtos_mon_arch.c.

References foo, and shell_add_entry().

Referenced by init_sysmon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rtos_mon_periodic_arch()

Variable Documentation

◆ cpu_window

struct rtos_mon_cpu_window cpu_window
static

Definition at line 46 of file rtos_mon_arch.c.

Referenced by get_thread_delta(), and rtos_mon_periodic_arch().