From f80394a20254938142011855f2954b3f63fe5909 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 15 Sep 2020 08:00:00 +0200 Subject: New upstream version 3.0.2 --- ProcessList.c | 69 +++-------------------------------------------------------- 1 file changed, 3 insertions(+), 66 deletions(-) (limited to 'ProcessList.c') 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 #include -/*{ -#include "Vector.h" -#include "Hashtable.h" -#include "UsersTable.h" -#include "Panel.h" -#include "Process.h" -#include "Settings.h" -#ifdef HAVE_LIBHWLOC -#include -#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) { -- cgit v1.2.3