Commit 75598c13 authored by Guy M. Broome's avatar Guy M. Broome Committed by Hisham Muhammad
Browse files

Solaris: Implement kernel thread counting

parent c235b45c
...@@ -413,6 +413,8 @@ void ProcessList_goThroughEntries(ProcessList* this) { ...@@ -413,6 +413,8 @@ void ProcessList_goThroughEntries(ProcessList* this) {
dir = opendir(PROCDIR); dir = opendir(PROCDIR);
if (!dir) return; // Is proc mounted? if (!dir) return; // Is proc mounted?
// We always count the scheduler
this->kernelThreads = 1;
while ((entry = readdir(dir)) != NULL) { while ((entry = readdir(dir)) != NULL) {
addRunning = 0; addRunning = 0;
addTotal = 0; addTotal = 0;
...@@ -518,7 +520,7 @@ void ProcessList_goThroughEntries(ProcessList* this) { ...@@ -518,7 +520,7 @@ void ProcessList_goThroughEntries(ProcessList* this) {
ProcessList_enumerateLWPs(proc, name, this, tv); ProcessList_enumerateLWPs(proc, name, this, tv);
} }
proc->show = !(hideKernelThreads && sproc->kernel); proc->show = !(hideKernelThreads && sproc->kernel);
if (_pstatus.pr_flags & sproc->kernel) { if (sproc->kernel) {
if (hideKernelThreads) { if (hideKernelThreads) {
addRunning = 0; addRunning = 0;
addTotal = 0; addTotal = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment