aboutsummaryrefslogtreecommitdiffstats
path: root/ProcessList.c
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 /ProcessList.c
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 'ProcessList.c')
-rw-r--r--ProcessList.c69
1 files changed, 3 insertions, 66 deletions
diff --git a/ProcessList.c b/ProcessList.c
index 36b494e..aa529d5 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -14,75 +14,12 @@ in the source distribution for its full text.
#include <stdlib.h>
#include <string.h>
-/*{
-#include "Vector.h"
-#include "Hashtable.h"
-#include "UsersTable.h"
-#include "Panel.h"
-#include "Process.h"
-#include "Settings.h"
-#ifdef HAVE_LIBHWLOC
-#include <hwloc.h>
-#endif
-
-#ifndef MAX_NAME
-#define MAX_NAME 128
-#endif
-
-#ifndef MAX_READ
-#define MAX_READ 2048
-#endif
-
-typedef struct ProcessList_ {
- Settings* settings;
-
- Vector* processes;
- Vector* processes2;
- Hashtable* processTable;
- UsersTable* usersTable;
-
- Panel* panel;
- int following;
- uid_t userId;
- const char* incFilter;
- Hashtable* pidWhiteList;
-
- #ifdef HAVE_LIBHWLOC
- hwloc_topology_t topology;
- bool topologyOk;
- #endif
-
- int totalTasks;
- int runningTasks;
- int userlandThreads;
- int kernelThreads;
-
- unsigned long long int totalMem;
- unsigned long long int usedMem;
- unsigned long long int freeMem;
- unsigned long long int sharedMem;
- unsigned long long int buffersMem;
- unsigned long long int cachedMem;
- unsigned long long int totalSwap;
- unsigned long long int usedSwap;
- unsigned long long int freeSwap;
-
- int cpuCount;
-
-} ProcessList;
-
-ProcessList* ProcessList_new(UsersTable* ut, Hashtable* pidWhiteList, uid_t userId);
-void ProcessList_delete(ProcessList* pl);
-void ProcessList_goThroughEntries(ProcessList* pl);
-
-}*/
-
-ProcessList* ProcessList_init(ProcessList* this, ObjectClass* klass, UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) {
+ProcessList* ProcessList_init(ProcessList* this, ObjectClass* klass, UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) {
this->processes = Vector_new(klass, true, DEFAULT_SIZE);
this->processTable = Hashtable_new(140, false);
this->usersTable = usersTable;
- this->pidWhiteList = pidWhiteList;
+ this->pidMatchList = pidMatchList;
this->userId = userId;
// tree-view auxiliary buffer
@@ -317,7 +254,7 @@ void ProcessList_rebuildPanel(ProcessList* this) {
if ( (!p->show)
|| (this->userId != (uid_t) -1 && (p->st_uid != this->userId))
|| (incFilter && !(String_contains_i(p->comm, incFilter)))
- || (this->pidWhiteList && !Hashtable_get(this->pidWhiteList, p->tgid)) )
+ || (this->pidMatchList && !Hashtable_get(this->pidMatchList, p->tgid)) )
hidden = true;
if (!hidden) {

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