summaryrefslogtreecommitdiffstats
path: root/Meter.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-05-02 09:02:22 +1000
committerNathan Scott <nathans@redhat.com>2023-05-08 13:06:07 +1000
commit0bdade1b6cb40c5bd374a93ac0489058a7421bb5 (patch)
tree0e0225f7dbf6867402c5ed3481a705d01941f42e /Meter.h
parente4ebe18b67c366d367231a1123b057c82018cf5b (diff)
Introduce Machine class for host-specific info (split from ProcessList)
First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes.
Diffstat (limited to 'Meter.h')
-rw-r--r--Meter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Meter.h b/Meter.h
index 8e8618d6..db93e4c0 100644
--- a/Meter.h
+++ b/Meter.h
@@ -15,8 +15,8 @@ in the source distribution for its full text.
#include <sys/time.h>
#include "ListItem.h"
+#include "Machine.h"
#include "Object.h"
-#include "ProcessList.h"
#define METER_TXTBUFFER_LEN 256
@@ -105,6 +105,7 @@ typedef struct GraphData_ {
struct Meter_ {
Object super;
Meter_Draw draw;
+ const Machine* host;
char* caption;
int mode;
@@ -112,7 +113,6 @@ struct Meter_ {
GraphData* drawData;
int h;
int columnWidthCount; /**< only used internally by the Header */
- const ProcessList* pl;
uint8_t curItems;
const int* curAttributes;
char txtBuffer[METER_TXTBUFFER_LEN];
@@ -145,7 +145,7 @@ typedef enum {
extern const MeterClass Meter_class;
-Meter* Meter_new(const ProcessList* pl, unsigned int param, const MeterClass* type);
+Meter* Meter_new(const Machine* host, unsigned int param, const MeterClass* type);
int Meter_humanUnit(char* buffer, unsigned long int value, size_t size);

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