summaryrefslogtreecommitdiffstats
path: root/netbsd
diff options
context:
space:
mode:
authorfraggerfox <santhosh.raju@gmail.com>2021-04-09 07:48:52 +0530
committerBenBE <BenBE@geshi.org>2021-06-26 12:18:37 +0200
commitdb986236843ac87c89ea74cd13ab4aa8d90cf935 (patch)
treed02227c34aeabec54a8717423cce81a1983a94f8 /netbsd
parent4b49de44a8659674c6e92ba70e0c1930b2b9315b (diff)
Sync changes from master and fix minor warnings
Diffstat (limited to 'netbsd')
-rw-r--r--netbsd/NetBSDProcessList.c4
-rw-r--r--netbsd/Platform.h19
2 files changed, 21 insertions, 2 deletions
diff --git a/netbsd/NetBSDProcessList.c b/netbsd/NetBSDProcessList.c
index 5b141183..5208c7b4 100644
--- a/netbsd/NetBSDProcessList.c
+++ b/netbsd/NetBSDProcessList.c
@@ -62,7 +62,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, ui
CRT_fatalError("pagesize sysconf call failed");
pageSizeKB = pageSize / ONE_K;
- for (int i = 0; i <= pl->cpuCount; i++) {
+ for (unsigned int i = 0; i <= pl->cpuCount; i++) {
CPUData* d = opl->cpus + i;
d->totalTime = 1;
d->totalPeriod = 1;
@@ -361,7 +361,7 @@ static void NetBSDProcessList_scanCPUTime(NetBSDProcessList* this) {
u_int64_t kernelTimes[CPUSTATES] = {0};
u_int64_t avg[CPUSTATES] = {0};
- for (int i = 0; i < this->super.cpuCount; i++) {
+ for (unsigned int i = 0; i < this->super.cpuCount; i++) {
getKernelCPUTimes(i, kernelTimes);
CPUData* cpu = this->cpus + i + 1;
kernelCPUTimesToHtop(kernelTimes, cpu);
diff --git a/netbsd/Platform.h b/netbsd/Platform.h
index f034e816..15129f6a 100644
--- a/netbsd/Platform.h
+++ b/netbsd/Platform.h
@@ -19,10 +19,15 @@ in the source distribution for its full text.
#include "Process.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
+#include "generic/gettime.h"
#include "generic/hostname.h"
#include "generic/uname.h"
+/* There are no Long Options for NetBSD as of now. */
+#define PLATFORM_LONG_OPTIONS \
+ // End of list
+
extern const ProcessField Platform_defaultFields[];
/* see /usr/include/sys/signal.h */
@@ -70,4 +75,18 @@ static inline void Platform_getRelease(char** string) {
*string = Generic_uname();
}
+static inline void Platform_longOptionsUsage(ATTR_UNUSED const char* name) { }
+
+static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int argc, ATTR_UNUSED char** argv) {
+ return false;
+}
+
+static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) {
+ Generic_gettime_realtime(tv, msec);
+}
+
+static inline void Platform_gettime_monotonic(uint64_t* msec) {
+ Generic_gettime_monotonic(msec);
+}
+
#endif

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