diff options
author | Daniel Lange <DLange@git.local> | 2020-09-15 08:00:01 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-09-15 08:00:01 +0200 |
commit | 8e8165109aca4e3c2a8558653df088d674061c78 (patch) | |
tree | d68c91ced3a78c65be9ae262ea84676e73cac68d /ProcessList.c | |
parent | e9302ddfaeaad62b12bdd352958fb194a26f3c74 (diff) | |
parent | f80394a20254938142011855f2954b3f63fe5909 (diff) | |
download | debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.tar.gz debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.tar.bz2 debian_htop-8e8165109aca4e3c2a8558653df088d674061c78.zip |
Update upstream source from tag 'upstream/3.0.2'
Update to upstream version '3.0.2'
with Debian dir 26e1b8d7612e50e81b8325506c1ce54f71cba270
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 69 |
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) { |