aboutsummaryrefslogtreecommitdiffstats
path: root/solaris/Platform.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2023-02-05 04:25:56 +0100
committerDaniel Lange <DLange@git.local>2023-02-05 04:25:56 +0100
commitf288666edc9180a2e81e6655951878124f321df6 (patch)
treeda70bf44b2423f6f8e9a070c063fed79d190b489 /solaris/Platform.c
parent937052b231259a47d881d539ad5748245ef55b99 (diff)
downloaddebian_htop-f288666edc9180a2e81e6655951878124f321df6.tar.gz
debian_htop-f288666edc9180a2e81e6655951878124f321df6.tar.bz2
debian_htop-f288666edc9180a2e81e6655951878124f321df6.zip
New upstream version 3.2.2upstream/3.2.2
Diffstat (limited to 'solaris/Platform.c')
-rw-r--r--solaris/Platform.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/solaris/Platform.c b/solaris/Platform.c
index 9c5acb5..96f3526 100644
--- a/solaris/Platform.c
+++ b/solaris/Platform.c
@@ -144,7 +144,7 @@ void Platform_setBindings(Htop_Action* keys) {
(void) keys;
}
-int Platform_getUptime() {
+int Platform_getUptime(void) {
int boot_time = 0;
int curr_time = time(NULL);
struct utmpx* ent;
@@ -173,7 +173,7 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen) {
*fifteen = plat_loadavg[LOADAVG_15MIN];
}
-int Platform_getMaxPid() {
+int Platform_getMaxPid(void) {
int vproc = 32778; // Reasonable Solaris default
kstat_ctl_t* kc = kstat_open();
@@ -237,18 +237,18 @@ double Platform_setCPUValues(Meter* this, unsigned int cpu) {
void Platform_setMemoryValues(Meter* this) {
const ProcessList* pl = this->pl;
this->total = pl->totalMem;
- this->values[0] = pl->usedMem;
- this->values[1] = pl->buffersMem;
- // this->values[2] = "shared memory, like tmpfs and shm"
- this->values[3] = pl->cachedMem;
- // this->values[4] = "available memory"
+ this->values[MEMORY_METER_USED] = pl->usedMem;
+ this->values[MEMORY_METER_BUFFERS] = pl->buffersMem;
+ // this->values[MEMORY_METER_SHARED] = "shared memory, like tmpfs and shm"
+ this->values[MEMORY_METER_CACHE] = pl->cachedMem;
+ // this->values[MEMORY_METER_AVAILABLE] = "available memory"
}
void Platform_setSwapValues(Meter* this) {
const ProcessList* pl = this->pl;
this->total = pl->totalSwap;
- this->values[0] = pl->usedSwap;
- this->values[1] = NAN;
+ this->values[SWAP_METER_USED] = pl->usedSwap;
+ this->values[SWAP_METER_CACHE] = NAN;
}
void Platform_setZfsArcValues(Meter* this) {
@@ -308,12 +308,6 @@ char* Platform_getProcessEnv(pid_t pid) {
return xRealloc(envBuilder.env, envBuilder.size + 1);
}
-char* Platform_getInodeFilename(pid_t pid, ino_t inode) {
- (void)pid;
- (void)inode;
- return NULL;
-}
-
FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) {
(void)pid;
return NULL;

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