mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[all] refactor cpuInfo function names
This commit is contained in:
@@ -24,8 +24,9 @@
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
bool lgCPUInfo(char * model, size_t modelSize, int * procs, int * cores,
|
||||
bool cpuInfo_get(char * model, size_t modelSize, int * procs, int * cores,
|
||||
int * sockets);
|
||||
void lgDebugCPU(void);
|
||||
|
||||
void cpuInfo_log(void);
|
||||
|
||||
#endif
|
||||
|
@@ -21,14 +21,14 @@
|
||||
#include "common/cpuinfo.h"
|
||||
#include "common/debug.h"
|
||||
|
||||
void lgDebugCPU(void)
|
||||
void cpuInfo_log(void)
|
||||
{
|
||||
char model[1024];
|
||||
int procs;
|
||||
int cores;
|
||||
int sockets;
|
||||
|
||||
if (!lgCPUInfo(model, sizeof model, &procs, &cores, &sockets))
|
||||
if (!cpuInfo_get(model, sizeof model, &procs, &cores, &sockets))
|
||||
{
|
||||
DEBUG_WARN("Failed to get CPU information");
|
||||
return;
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
bool lgCPUInfo(char * model, size_t modelSize, int * procs, int * cores,
|
||||
bool cpuInfo_get(char * model, size_t modelSize, int * procs, int * cores,
|
||||
int * sockets)
|
||||
{
|
||||
FILE * cpuinfo = fopen("/proc/cpuinfo", "r");
|
||||
|
@@ -108,7 +108,7 @@ static bool getCoreCount(int * cores, int * procs, int * sockets)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool lgCPUInfo(char * model, size_t modelSize, int * procs, int * cores,
|
||||
bool cpuInfo_get(char * model, size_t modelSize, int * procs, int * cores,
|
||||
int * sockets)
|
||||
{
|
||||
return getCPUModel(model, modelSize) && getCoreCount(cores, procs, sockets);
|
||||
|
Reference in New Issue
Block a user