![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
Classes | |
| class | DarwinCpu |
| stub implementation of Os::CpuInterface More... | |
| struct | DarwinCpuHandle |
Functions | |
| kern_return_t | cpu_data_helper (processor_cpu_load_info_t &cpu_load_info, FwSizeType &cpu_count, mach_msg_type_number_t &processor_msg_count) |
| helper around raw CPU capture API More... | |
| void | cpu_data_release (processor_cpu_load_info_t cpu_load_info, mach_msg_type_number_t processor_msg_count) |
| release the CPU information allocated by the kernel inside cpu_data_helper More... | |
| kern_return_t | cpu_by_index (FwSizeType cpu_index, FwSizeType &used, FwSizeType &total) |
| Query for a single CPU's ticks information. More... | |
| kern_return_t Os::Darwin::Cpu::cpu_by_index | ( | FwSizeType | cpu_index, |
| FwSizeType & | used, | ||
| FwSizeType & | total | ||
| ) |
Query for a single CPU's ticks information.
Queries all CPU information but only deals with a single CPU's output. This is done because the load average is tracked sample to sample and the call pattern is cpu0, cpu1, ..., cpu last, wait for sample window, cpu0, ... and thus each call should update one CPU's sample or only the last cpu will have the benefit of the sampling window.
| cpu_index | index of current CPU being queried |
| used | filled with CPU's used ticks count |
| total | filled with CPU's total ticks |
| kern_return_t Os::Darwin::Cpu::cpu_data_helper | ( | processor_cpu_load_info_t & | cpu_load_info, |
| FwSizeType & | cpu_count, | ||
| mach_msg_type_number_t & | processor_msg_count | ||
| ) |
helper around raw CPU capture API
Calls for the CPU information from the machine, improving readability in cpu_by_index
| cpu_load_info | filled with CPU data |
| cpu_count | filled with CPU count |
| processor_msg_count | filled with the size of the kernel allocation in integer_t units |
| void Os::Darwin::Cpu::cpu_data_release | ( | processor_cpu_load_info_t | cpu_load_info, |
| mach_msg_type_number_t | processor_msg_count | ||
| ) |