summaryrefslogtreecommitdiffstats
path: root/netbsd/Platform.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-05-02 16:56:18 +1000
committerNathan Scott <nathans@redhat.com>2023-05-08 13:06:38 +1000
commit72235d8e098d9d79029dca65122605741e1aafad (patch)
tree96593b8bd9dc95dc5ab321bd363d36351cbd0a99 /netbsd/Platform.c
parent0bdade1b6cb40c5bd374a93ac0489058a7421bb5 (diff)
Adapt platform code for the new Machine base class
Move host-centric data to new derived <Platform>Machine classes, separate from process-list-centric data.
Diffstat (limited to 'netbsd/Platform.c')
-rw-r--r--netbsd/Platform.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/netbsd/Platform.c b/netbsd/Platform.c
index ea81a26a..1d6509ff 100644
--- a/netbsd/Platform.c
+++ b/netbsd/Platform.c
@@ -45,7 +45,6 @@ in the source distribution for its full text.
#include "MemoryMeter.h"
#include "MemorySwapMeter.h"
#include "Meter.h"
-#include "ProcessList.h"
#include "Settings.h"
#include "SignalsPanel.h"
#include "SwapMeter.h"
@@ -54,8 +53,8 @@ in the source distribution for its full text.
#include "UptimeMeter.h"
#include "XUtils.h"
#include "generic/fdstat_sysctl.h"
+#include "netbsd/NetBSDMachine.h"
#include "netbsd/NetBSDProcess.h"
-#include "netbsd/NetBSDProcessList.h"
/*
* The older proplib APIs will be deprecated in NetBSD 10, but we still
@@ -238,8 +237,8 @@ int Platform_getMaxPid(void) {
double Platform_setCPUValues(Meter* this, int cpu) {
const Machine* host = this->host;
- const NetBSDProcessList* npl = (const NetBSDProcessList*) host->pl;
- const CPUData* cpuData = &npl->cpuData[cpu];
+ const NetBSDMachine* nhost = (const NetBSDMachine*) host;
+ const CPUData* cpuData = &nhost->cpuData[cpu];
double total = cpuData->totalPeriod == 0 ? 1 : cpuData->totalPeriod;
double totalPercent;
double* v = this->values;

© 2014-2024 Faster IT GmbH | imprint | privacy policy