diff options
author | Daniel Lange <DLange@git.local> | 2020-09-15 08:00:00 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-09-15 08:00:00 +0200 |
commit | f80394a20254938142011855f2954b3f63fe5909 (patch) | |
tree | b777de460977f21a6257540d6a687c86882850dc /solaris | |
parent | 59eeadec918a955b40427a1b012992161050c939 (diff) | |
download | debian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.gz debian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.bz2 debian_htop-f80394a20254938142011855f2954b3f63fe5909.zip |
New upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'solaris')
-rw-r--r-- | solaris/Battery.h | 3 | ||||
-rw-r--r-- | solaris/Platform.c | 22 | ||||
-rw-r--r-- | solaris/Platform.h | 3 | ||||
-rw-r--r-- | solaris/SolarisCRT.h | 5 | ||||
-rw-r--r-- | solaris/SolarisProcess.c | 44 | ||||
-rw-r--r-- | solaris/SolarisProcess.h | 11 | ||||
-rw-r--r-- | solaris/SolarisProcessList.c | 45 | ||||
-rw-r--r-- | solaris/SolarisProcessList.h | 8 |
8 files changed, 6 insertions, 135 deletions
diff --git a/solaris/Battery.h b/solaris/Battery.h index 8dc0cef..21a1579 100644 --- a/solaris/Battery.h +++ b/solaris/Battery.h @@ -1,9 +1,6 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_Battery #define HEADER_Battery void Battery_getData(double* level, ACPresence* isOnAC); - #endif diff --git a/solaris/Platform.c b/solaris/Platform.c index 092f450..436c9ce 100644 --- a/solaris/Platform.c +++ b/solaris/Platform.c @@ -33,28 +33,6 @@ in the source distribution for its full text. #include <math.h> #include <sys/var.h> -/*{ -#include "Action.h" -#include "BatteryMeter.h" -#include "SignalsPanel.h" -#include <signal.h> -#include <sys/mkdev.h> -#include <sys/proc.h> -#include <libproc.h> - -#define kill(pid, signal) kill(pid / 1024, signal) - -extern ProcessFieldData Process_fields[]; -typedef struct var kvar_t; - -typedef struct envAccum_ { - size_t capacity; - size_t size; - size_t bytes; - char *env; -} envAccum; - -}*/ double plat_loadavg[3] = {0}; diff --git a/solaris/Platform.h b/solaris/Platform.h index dd1962d..dd8614d 100644 --- a/solaris/Platform.h +++ b/solaris/Platform.h @@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_Platform #define HEADER_Platform /* @@ -31,7 +29,6 @@ typedef struct envAccum_ { char *env; } envAccum; - extern double plat_loadavg[3]; extern const SignalItem Platform_signals[]; diff --git a/solaris/SolarisCRT.h b/solaris/SolarisCRT.h index 6ab6dfc..4e37b7f 100644 --- a/solaris/SolarisCRT.h +++ b/solaris/SolarisCRT.h @@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_SolarisCRT #define HEADER_SolarisCRT /* @@ -10,9 +8,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#ifdef HAVE_EXECINFO_H -#endif - void CRT_handleSIGSEGV(int sgn); #endif diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c index 514453f..ab0bcab 100644 --- a/solaris/SolarisProcess.c +++ b/solaris/SolarisProcess.c @@ -17,50 +17,6 @@ in the source distribution for its full text. #include <unistd.h> #include <sys/syscall.h> -/*{ -#include "Settings.h" -#include <zone.h> -#include <sys/proc.h> -#include <libproc.h> - -typedef enum SolarisProcessFields { - // Add platform-specific fields here, with ids >= 100 - ZONEID = 100, - ZONE = 101, - PROJID = 102, - TASKID = 103, - POOLID = 104, - CONTID = 105, - LWPID = 106, - LAST_PROCESSFIELD = 107, -} SolarisProcessField; - - -typedef struct SolarisProcess_ { - Process super; - int kernel; - zoneid_t zoneid; - char* zname; - taskid_t taskid; - projid_t projid; - poolid_t poolid; - ctid_t contid; - bool is_lwp; - pid_t realpid; - pid_t realppid; - pid_t lwpid; -} SolarisProcess; - - -#ifndef Process_isKernelThread -#define Process_isKernelThread(_process) (_process->kernel == 1) -#endif - -#ifndef Process_isUserlandThread -#define Process_isUserlandThread(_process) (_process->pid != _process->tgid) -#endif - -}*/ ProcessClass SolarisProcess_class = { .super = { diff --git a/solaris/SolarisProcess.h b/solaris/SolarisProcess.h index 1b3492a..d36dea3 100644 --- a/solaris/SolarisProcess.h +++ b/solaris/SolarisProcess.h @@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_SolarisProcess #define HEADER_SolarisProcess /* @@ -15,7 +13,7 @@ in the source distribution for its full text. #include <sys/proc.h> #include <libproc.h> -typedef enum SolarisProcessFields { +typedef enum SolarisProcessField_ { // Add platform-specific fields here, with ids >= 100 ZONEID = 100, ZONE = 101, @@ -27,7 +25,6 @@ typedef enum SolarisProcessFields { LAST_PROCESSFIELD = 107, } SolarisProcessField; - typedef struct SolarisProcess_ { Process super; int kernel; @@ -43,15 +40,9 @@ typedef struct SolarisProcess_ { pid_t lwpid; } SolarisProcess; - -#ifndef Process_isKernelThread #define Process_isKernelThread(_process) (_process->kernel == 1) -#endif -#ifndef Process_isUserlandThread #define Process_isUserlandThread(_process) (_process->pid != _process->tgid) -#endif - extern ProcessClass SolarisProcess_class; diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c index ab2cf68..4e4d282 100644 --- a/solaris/SolarisProcessList.c +++ b/solaris/SolarisProcessList.c @@ -25,45 +25,6 @@ in the source distribution for its full text. #define MAXCMDLINE 255 -#define GZONE "global " -#define UZONE "unknown " -/*{ - -#include "zfs/ZfsArcStats.h" - -#include <kstat.h> -#include <sys/param.h> -#include <sys/uio.h> -#include <sys/resource.h> -#include <sys/sysconf.h> -#include <sys/sysinfo.h> -#include <sys/swap.h> - -#define ZONE_ERRMSGLEN 1024 -char zone_errmsg[ZONE_ERRMSGLEN]; - -typedef struct CPUData_ { - double userPercent; - double nicePercent; - double systemPercent; - double irqPercent; - double idlePercent; - double systemAllPercent; - uint64_t luser; - uint64_t lkrnl; - uint64_t lintr; - uint64_t lidle; -} CPUData; - -typedef struct SolarisProcessList_ { - ProcessList super; - kstat_ctl_t* kd; - CPUData* cpus; - ZfsArcStats zfs; -} SolarisProcessList; - -}*/ - char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc) { char* zname; if ( sproc->zoneid == 0 ) { @@ -77,10 +38,10 @@ char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc) { return zname; } -ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) { +ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) { SolarisProcessList* spl = xCalloc(1, sizeof(SolarisProcessList)); ProcessList* pl = (ProcessList*) spl; - ProcessList_init(pl, Class(SolarisProcess), usersTable, pidWhiteList, userId); + ProcessList_init(pl, Class(SolarisProcess), usersTable, pidMatchList, userId); spl->kd = kstat_open(); @@ -323,7 +284,7 @@ int SolarisProcessList_walkproc(psinfo_t *_psinfo, lwpsinfo_t *_lwpsinfo, void * sproc->poolid = _psinfo->pr_poolid; sproc->contid = _psinfo->pr_contract; proc->priority = _lwpsinfo->pr_pri; - proc->nice = _lwpsinfo->pr_nice; + proc->nice = _lwpsinfo->pr_nice - NZERO; proc->processor = _lwpsinfo->pr_onpro; proc->state = _lwpsinfo->pr_sname; // NOTE: This 'percentage' is a 16-bit BINARY FRACTIONS where 1.0 = 0x8000 diff --git a/solaris/SolarisProcessList.h b/solaris/SolarisProcessList.h index 06c1330..9da39b4 100644 --- a/solaris/SolarisProcessList.h +++ b/solaris/SolarisProcessList.h @@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_SolarisProcessList #define HEADER_SolarisProcessList /* @@ -26,7 +24,7 @@ in the source distribution for its full text. #include <sys/swap.h> #define ZONE_ERRMSGLEN 1024 -char zone_errmsg[ZONE_ERRMSGLEN]; +extern char zone_errmsg[ZONE_ERRMSGLEN]; typedef struct CPUData_ { double userPercent; @@ -48,10 +46,9 @@ typedef struct SolarisProcessList_ { ZfsArcStats zfs; } SolarisProcessList; - char* SolarisProcessList_readZoneName(kstat_ctl_t* kd, SolarisProcess* sproc); -ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId); +ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId); void ProcessList_delete(ProcessList* pl); @@ -65,5 +62,4 @@ int SolarisProcessList_walkproc(psinfo_t *_psinfo, lwpsinfo_t *_lwpsinfo, void * void ProcessList_goThroughEntries(ProcessList* this); - #endif |