summaryrefslogtreecommitdiffstats
path: root/freebsd/FreeBSDProcessList.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 /freebsd/FreeBSDProcessList.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 'freebsd/FreeBSDProcessList.h')
-rw-r--r--freebsd/FreeBSDProcessList.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/freebsd/FreeBSDProcessList.h b/freebsd/FreeBSDProcessList.h
index 98510fad..b7e29f8b 100644
--- a/freebsd/FreeBSDProcessList.h
+++ b/freebsd/FreeBSDProcessList.h
@@ -47,12 +47,16 @@ typedef struct FreeBSDProcessList_ {
} FreeBSDProcessList;
-ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId);
+ProcessList* ProcessList_new(Machine* host, Hashtable* pidMatchList);
void ProcessList_delete(ProcessList* this);
void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
-bool ProcessList_isCPUonline(const ProcessList* super, unsigned int id);
+Machine* Machine_new(UsersTable* usersTable, uid_t userId);
+
+bool Machine_isCPUonline(const Machine* host, unsigned int id);
+
+void Machine_delete(Machine* host);
#endif

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