diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2010-11-23 13:28:47 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2010-11-23 13:28:47 +0000 |
commit | 831538b0f90a2ae6448522dc6c0bbcb73ba12f97 (patch) | |
tree | 20a7ce96806a833f4c17565bd542c3fb5efc956a /ProcessList.c | |
parent | d8e1480a27e1e26b8dfa97681bf8e7f90946d336 (diff) |
Split process and thread counts in tasks meter
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ProcessList.c b/ProcessList.c index c37919ba..d94a3fcc 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -94,6 +94,8 @@ typedef struct ProcessList_ { int cpuCount; int totalTasks; + int userlandThreads; + int kernelThreads; int runningTasks; CPUData* cpus; @@ -635,6 +637,11 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P if (! ProcessList_readCmdlineFile(process, dirname, name)) goto errorReadingProcess; } + if (Process_isKernelThread(process)) { + this->kernelThreads++; + } else { + this->userlandThreads++; + } } this->totalTasks++; @@ -772,6 +779,8 @@ void ProcessList_scan(ProcessList* this) { } this->totalTasks = 0; + this->userlandThreads = 0; + this->kernelThreads = 0; this->runningTasks = 0; ProcessList_processEntries(this, PROCDIR, NULL, period); |