PX4 Firmware
PX4 Autopilot Software http://px4.io
printload.h File Reference

Print the current system load. More...

#include <px4_platform_common/px4_config.h>
#include <stdint.h>
Include dependency graph for printload.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  print_load_s
 

Macros

#define CONFIG_MAX_TASKS   64
 

Typedefs

typedef void(* print_load_callback_f) (void *user)
 

Functions

__BEGIN_DECLS __EXPORT void init_print_load_s (uint64_t t, struct print_load_s *s)
 
__EXPORT void print_load (uint64_t t, int fd, struct print_load_s *print_state)
 
void print_load_buffer (uint64_t t, char *buffer, int buffer_length, print_load_callback_f cb, void *user, struct print_load_s *print_state)
 Print load to a buffer, and call cb after each written line (buffer will not include '
') More...
 

Detailed Description

Print the current system load.

Author
Lorenz Meier loren.nosp@m.z@px.nosp@m.4.io

Definition in file printload.h.

Macro Definition Documentation

◆ CONFIG_MAX_TASKS

#define CONFIG_MAX_TASKS   64

Typedef Documentation

◆ print_load_callback_f

typedef void(* print_load_callback_f) (void *user)

Definition at line 71 of file printload.h.

Function Documentation

◆ init_print_load_s()

__BEGIN_DECLS __EXPORT void init_print_load_s ( uint64_t  t,
struct print_load_s s 
)

Definition at line 66 of file print_load_posix.c.

References print_load_s::blocked_count, CONFIG_MAX_TASKS, print_load_s::interval_start_time, print_load_s::interval_time_ms_inv, print_load_s::last_times, print_load_s::new_time, print_load_s::running_count, and print_load_s::total_user_time.

Referenced by px4::logger::Logger::initialize_load_output(), and top_main().

Here is the caller graph for this function:

◆ print_load()

__EXPORT void print_load ( uint64_t  t,
int  fd,
struct print_load_s print_state 
)

Definition at line 84 of file print_load_posix.c.

References CL.

Referenced by top_main().

Here is the caller graph for this function:

◆ print_load_buffer()

void print_load_buffer ( uint64_t  t,
char *  buffer,
int  buffer_length,
print_load_callback_f  cb,
void *  user,
struct print_load_s print_state 
)

Print load to a buffer, and call cb after each written line (buffer will not include '
')

Definition at line 178 of file print_load_posix.c.

Referenced by px4::logger::Logger::initialize_load_output(), and px4::logger::Logger::write_load_output().

Here is the caller graph for this function: