summaryrefslogtreecommitdiffstats
path: root/Affinity.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 /Affinity.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 'Affinity.h')
-rw-r--r--Affinity.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Affinity.h b/Affinity.h
index 5e7bfe2e..58d9bd73 100644
--- a/Affinity.h
+++ b/Affinity.h
@@ -3,14 +3,14 @@
/*
htop - Affinity.h
(C) 2004-2011 Hisham H. Muhammad
-(C) 2020 Red Hat, Inc. All Rights Reserved.
+(C) 2020,2023 Red Hat, Inc. All Rights Reserved.
Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
-#include "ProcessList.h"
+#include "Machine.h"
#if defined(HAVE_LIBHWLOC) || defined(HAVE_AFFINITY)
#include <stdbool.h>
@@ -26,13 +26,13 @@ in the source distribution for its full text.
typedef struct Affinity_ {
- ProcessList* pl;
+ Machine* host;
unsigned int size;
unsigned int used;
unsigned int* cpus;
} Affinity;
-Affinity* Affinity_new(ProcessList* pl);
+Affinity* Affinity_new(Machine* host);
void Affinity_delete(Affinity* this);
@@ -40,7 +40,7 @@ void Affinity_add(Affinity* this, unsigned int id);
#if defined(HAVE_LIBHWLOC) || defined(HAVE_AFFINITY)
-Affinity* Affinity_get(const Process* proc, ProcessList* pl);
+Affinity* Affinity_get(const Process* proc, Machine* host);
bool Affinity_set(Process* proc, Arg arg);

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