summaryrefslogtreecommitdiffstats
path: root/openbsd/OpenBSDProcessList.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:00:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:00:29 +0000
commit52e25213825024b8bb446eb26b03bedc9d5c2103 (patch)
treeda70bf44b2423f6f8e9a070c063fed79d190b489 /openbsd/OpenBSDProcessList.h
parentInitial commit. (diff)
downloadhtop-a3acf87a6f5b793b4b57b4512821b2e970a8b7bc.tar.xz
htop-a3acf87a6f5b793b4b57b4512821b2e970a8b7bc.zip
Adding upstream version 3.2.2.upstream/3.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'openbsd/OpenBSDProcessList.h')
-rw-r--r--openbsd/OpenBSDProcessList.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/openbsd/OpenBSDProcessList.h b/openbsd/OpenBSDProcessList.h
new file mode 100644
index 0000000..89fdb09
--- /dev/null
+++ b/openbsd/OpenBSDProcessList.h
@@ -0,0 +1,60 @@
+#ifndef HEADER_OpenBSDProcessList
+#define HEADER_OpenBSDProcessList
+/*
+htop - OpenBSDProcessList.h
+(C) 2014 Hisham H. Muhammad
+(C) 2015 Michael McConville
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#include <kvm.h>
+#include <stdbool.h>
+#include <sys/types.h>
+
+#include "Hashtable.h"
+#include "ProcessList.h"
+#include "UsersTable.h"
+
+
+typedef struct CPUData_ {
+ unsigned long long int totalTime;
+ unsigned long long int userTime;
+ unsigned long long int niceTime;
+ unsigned long long int sysTime;
+ unsigned long long int sysAllTime;
+ unsigned long long int spinTime;
+ unsigned long long int intrTime;
+ unsigned long long int idleTime;
+
+ unsigned long long int totalPeriod;
+ unsigned long long int userPeriod;
+ unsigned long long int nicePeriod;
+ unsigned long long int sysPeriod;
+ unsigned long long int sysAllPeriod;
+ unsigned long long int spinPeriod;
+ unsigned long long int intrPeriod;
+ unsigned long long int idlePeriod;
+
+ bool online;
+} CPUData;
+
+typedef struct OpenBSDProcessList_ {
+ ProcessList super;
+ kvm_t* kd;
+
+ CPUData* cpuData;
+ int cpuSpeed;
+
+} OpenBSDProcessList;
+
+
+ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* dynamicMeters, Hashtable* dynamicColumns, Hashtable* pidMatchList, uid_t userId);
+
+void ProcessList_delete(ProcessList* this);
+
+void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate);
+
+bool ProcessList_isCPUonline(const ProcessList* super, unsigned int id);
+
+#endif