From 75598c138969c81485a17e3b709f236e7cd15049 Mon Sep 17 00:00:00 2001 From: "Guy M. Broome" Date: Tue, 27 Mar 2018 14:26:24 -0400 Subject: [PATCH] Solaris: Implement kernel thread counting --- solaris/SolarisProcessList.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c index cf2c440c..c42f5b0a 100644 --- a/solaris/SolarisProcessList.c +++ b/solaris/SolarisProcessList.c @@ -413,6 +413,8 @@ void ProcessList_goThroughEntries(ProcessList* this) { dir = opendir(PROCDIR); if (!dir) return; // Is proc mounted? + // We always count the scheduler + this->kernelThreads = 1; while ((entry = readdir(dir)) != NULL) { addRunning = 0; addTotal = 0; @@ -518,7 +520,7 @@ void ProcessList_goThroughEntries(ProcessList* this) { ProcessList_enumerateLWPs(proc, name, this, tv); } proc->show = !(hideKernelThreads && sproc->kernel); - if (_pstatus.pr_flags & sproc->kernel) { + if (sproc->kernel) { if (hideKernelThreads) { addRunning = 0; addTotal = 0;