aboutsummaryrefslogtreecommitdiffstats
path: root/dragonflybsd
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-09-15 08:00:00 +0200
committerDaniel Lange <DLange@git.local>2020-09-15 08:00:00 +0200
commitf80394a20254938142011855f2954b3f63fe5909 (patch)
treeb777de460977f21a6257540d6a687c86882850dc /dragonflybsd
parent59eeadec918a955b40427a1b012992161050c939 (diff)
downloaddebian_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 'dragonflybsd')
-rw-r--r--dragonflybsd/Battery.h2
-rw-r--r--dragonflybsd/DragonFlyBSDCRT.h6
-rw-r--r--dragonflybsd/DragonFlyBSDProcess.c28
-rw-r--r--dragonflybsd/DragonFlyBSDProcess.h10
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.c54
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.h11
-rw-r--r--dragonflybsd/Platform.c12
-rw-r--r--dragonflybsd/Platform.h7
8 files changed, 5 insertions, 125 deletions
diff --git a/dragonflybsd/Battery.h b/dragonflybsd/Battery.h
index efb44a8..f764a2d 100644
--- a/dragonflybsd/Battery.h
+++ b/dragonflybsd/Battery.h
@@ -1,5 +1,3 @@
-/* Do not edit this file. It was automatically generated. */
-
#ifndef HEADER_Battery
#define HEADER_Battery
/*
diff --git a/dragonflybsd/DragonFlyBSDCRT.h b/dragonflybsd/DragonFlyBSDCRT.h
index b934ac3..2bf85f7 100644
--- a/dragonflybsd/DragonFlyBSDCRT.h
+++ b/dragonflybsd/DragonFlyBSDCRT.h
@@ -1,5 +1,3 @@
-/* Do not edit this file. It was automatically generated. */
-
#ifndef HEADER_DragonFlyBSDCRT
#define HEADER_DragonFlyBSDCRT
/*
@@ -10,10 +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/dragonflybsd/DragonFlyBSDProcess.c b/dragonflybsd/DragonFlyBSDProcess.c
index ffaf5eb..770143b 100644
--- a/dragonflybsd/DragonFlyBSDProcess.c
+++ b/dragonflybsd/DragonFlyBSDProcess.c
@@ -17,34 +17,6 @@ in the source distribution for its full text.
#include <unistd.h>
#include <sys/syscall.h>
-/*{
-
-typedef enum DragonFlyBSDProcessFields {
- // Add platform-specific fields here, with ids >= 100
- JID = 100,
- JAIL = 101,
- LAST_PROCESSFIELD = 102,
-} DragonFlyBSDProcessField;
-
-
-typedef struct DragonFlyBSDProcess_ {
- Process super;
- int kernel;
- int jid;
- char* jname;
-} DragonFlyBSDProcess;
-
-
-#ifndef Process_isKernelThread
-#define Process_isKernelThread(_process) (_process->kernel == 1)
-#endif
-
-#ifndef Process_isUserlandThread
-//#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
-#define Process_isUserlandThread(_process) (_process->nlwp > 1)
-#endif
-
-}*/
ProcessClass DragonFlyBSDProcess_class = {
.super = {
diff --git a/dragonflybsd/DragonFlyBSDProcess.h b/dragonflybsd/DragonFlyBSDProcess.h
index 4a0f9a5..d5e5a6e 100644
--- a/dragonflybsd/DragonFlyBSDProcess.h
+++ b/dragonflybsd/DragonFlyBSDProcess.h
@@ -1,5 +1,3 @@
-/* Do not edit this file. It was automatically generated. */
-
#ifndef HEADER_DragonFlyBSDProcess
#define HEADER_DragonFlyBSDProcess
/*
@@ -10,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
-
typedef enum DragonFlyBSDProcessFields {
// Add platform-specific fields here, with ids >= 100
JID = 100,
@@ -18,7 +15,6 @@ typedef enum DragonFlyBSDProcessFields {
LAST_PROCESSFIELD = 102,
} DragonFlyBSDProcessField;
-
typedef struct DragonFlyBSDProcess_ {
Process super;
int kernel;
@@ -26,16 +22,10 @@ typedef struct DragonFlyBSDProcess_ {
char* jname;
} DragonFlyBSDProcess;
-
-#ifndef Process_isKernelThread
#define Process_isKernelThread(_process) (_process->kernel == 1)
-#endif
-#ifndef Process_isUserlandThread
//#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
#define Process_isUserlandThread(_process) (_process->nlwp > 1)
-#endif
-
extern ProcessClass DragonFlyBSDProcess_class;
diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c
index 5bc4b38..cd5526a 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.c
+++ b/dragonflybsd/DragonFlyBSDProcessList.c
@@ -21,54 +21,6 @@ in the source distribution for its full text.
#include <string.h>
#include <sys/param.h>
-/*{
-
-#include <kvm.h>
-#include <sys/param.h>
-#include <osreldate.h>
-#include <sys/kinfo.h>
-#include <kinfo.h>
-#include <sys/jail.h>
-#include <sys/uio.h>
-#include <sys/resource.h>
-#include "Hashtable.h"
-#include "DragonFlyBSDProcess.h"
-
-#define JAIL_ERRMSGLEN 1024
-char jail_errmsg[JAIL_ERRMSGLEN];
-
-typedef struct CPUData_ {
-
- double userPercent;
- double nicePercent;
- double systemPercent;
- double irqPercent;
- double idlePercent;
- double systemAllPercent;
-
-} CPUData;
-
-typedef struct DragonFlyBSDProcessList_ {
- ProcessList super;
- kvm_t* kd;
-
- unsigned long long int memWire;
- unsigned long long int memActive;
- unsigned long long int memInactive;
- unsigned long long int memFree;
-
- CPUData* cpus;
-
- unsigned long *cp_time_o;
- unsigned long *cp_time_n;
-
- unsigned long *cp_times_o;
- unsigned long *cp_times_n;
-
- Hashtable *jails;
-} DragonFlyBSDProcessList;
-
-}*/
#define _UNUSED_ __attribute__((unused))
@@ -89,12 +41,12 @@ static int MIB_kern_cp_time[2];
static int MIB_kern_cp_times[2];
static int kernelFScale;
-ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) {
+ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) {
size_t len;
char errbuf[_POSIX2_LINE_MAX];
DragonFlyBSDProcessList* dfpl = xCalloc(1, sizeof(DragonFlyBSDProcessList));
ProcessList* pl = (ProcessList*) dfpl;
- ProcessList_init(pl, Class(DragonFlyBSDProcess), usersTable, pidWhiteList, userId);
+ ProcessList_init(pl, Class(DragonFlyBSDProcess), usersTable, pidMatchList, userId);
// physical memory in system: hw.physmem
// physical page size: hw.pagesize
@@ -145,7 +97,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
sysctl(MIB_kern_cp_times, 2, dfpl->cp_times_o, &len, NULL, 0);
}
- pl->cpuCount = MAX(cpus, 1);
+ pl->cpuCount = MAXIMUM(cpus, 1);
if (cpus == 1 ) {
dfpl->cpus = xRealloc(dfpl->cpus, sizeof(CPUData));
diff --git a/dragonflybsd/DragonFlyBSDProcessList.h b/dragonflybsd/DragonFlyBSDProcessList.h
index 816e66d..84ab1c5 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.h
+++ b/dragonflybsd/DragonFlyBSDProcessList.h
@@ -1,5 +1,3 @@
-/* Do not edit this file. It was automatically generated. */
-
#ifndef HEADER_DragonFlyBSDProcessList
#define HEADER_DragonFlyBSDProcessList
/*
@@ -10,7 +8,6 @@ Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
-
#include <kvm.h>
#include <sys/param.h>
#include <osreldate.h>
@@ -23,17 +20,15 @@ in the source distribution for its full text.
#include "DragonFlyBSDProcess.h"
#define JAIL_ERRMSGLEN 1024
-char jail_errmsg[JAIL_ERRMSGLEN];
+extern char jail_errmsg[JAIL_ERRMSGLEN];
typedef struct CPUData_ {
-
double userPercent;
double nicePercent;
double systemPercent;
double irqPercent;
double idlePercent;
double systemAllPercent;
-
} CPUData;
typedef struct DragonFlyBSDProcessList_ {
@@ -56,11 +51,9 @@ typedef struct DragonFlyBSDProcessList_ {
Hashtable *jails;
} DragonFlyBSDProcessList;
-
#define _UNUSED_ __attribute__((unused))
-
-ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);
+ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId);
void ProcessList_delete(ProcessList* this);
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index 250e50e..3b8e1a0 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -27,18 +27,6 @@ in the source distribution for its full text.
#include <time.h>
#include <math.h>
-/*{
-#include "Action.h"
-#include "BatteryMeter.h"
-#include "SignalsPanel.h"
-
-extern ProcessFieldData Process_fields[];
-
-}*/
-
-#ifndef CLAMP
-#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
-#endif
ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 };
diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h
index c2684f3..83c14f5 100644
--- a/dragonflybsd/Platform.h
+++ b/dragonflybsd/Platform.h
@@ -1,5 +1,3 @@
-/* Do not edit this file. It was automatically generated. */
-
#ifndef HEADER_Platform
#define HEADER_Platform
/*
@@ -16,11 +14,6 @@ in the source distribution for its full text.
extern ProcessFieldData Process_fields[];
-
-#ifndef CLAMP
-#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
-#endif
-
extern ProcessField Platform_defaultFields[];
extern int Platform_numberOfFields;

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