OpenBSD: missing headers, typos
cpu.h: underscores in get_cpu_count() load.cc: underscores in get_cpu_count(), typos memory.cc: missing headers
This commit is contained in:
parent
112004f3db
commit
580b076b79
@ -11,6 +11,6 @@
|
||||
#define CPUSTATES 5
|
||||
|
||||
float cpu_percentage( unsigned );
|
||||
uint8_t getCpuCount();
|
||||
uint8_t get_cpu_count();
|
||||
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@ std::string load_string( bool use_colors = false )
|
||||
{
|
||||
std::stringstream ss;
|
||||
// Only get 3 load averages
|
||||
cont int nelem = 3;
|
||||
const int nelem = 3;
|
||||
double averages[nelem];
|
||||
// based on: opensource.apple.com/source/Libc/Libc-262/gen/getloadavg.c
|
||||
|
||||
@ -46,7 +46,7 @@ std::string load_string( bool use_colors = false )
|
||||
if( use_colors )
|
||||
{
|
||||
// may not work
|
||||
uint8_t cpu_count = getCpuCount();
|
||||
uint8_t cpu_count = get_cpu_count();
|
||||
|
||||
unsigned load_percent = static_cast<unsigned int>(
|
||||
averages[0] / cpu_count * 0.5f * 100.0f);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <sys/mount.h> // VFS_* which we use to get cache
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/vmmeter.h> // vmtotal struct
|
||||
@ -28,6 +29,7 @@
|
||||
#include "error.h"
|
||||
#include "memory.h"
|
||||
#include "../luts.h"
|
||||
#include "../conversions.h"
|
||||
|
||||
static int pageshift;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user