From 3451b6c6b8e5c794a06bfcaae2f22cabf8f6ea32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Sun, 13 Jun 2021 11:19:50 +0200 Subject: [PATCH] FreeBSD: calculate whether to show entry last Wait until it has been decided what kind of task the entry actually is. --- freebsd/FreeBSDProcessList.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 439960bc..2a2642bf 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -495,8 +495,6 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { Process* proc = ProcessList_getProcess(super, kproc->ki_pid, &preExisting, FreeBSDProcess_new); FreeBSDProcess* fp = (FreeBSDProcess*) proc; - proc->show = ! ((hideKernelThreads && Process_isKernelThread(proc)) || (hideUserlandThreads && Process_isUserlandThread(proc))); - if (!preExisting) { fp->jid = kproc->ki_jid; proc->pid = kproc->ki_pid; @@ -592,6 +590,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { if (Process_isKernelThread(proc)) super->kernelThreads++; + proc->show = ! ((hideKernelThreads && Process_isKernelThread(proc)) || (hideUserlandThreads && Process_isUserlandThread(proc))); + super->totalTasks++; if (proc->state == 'R') super->runningTasks++;