FreeBSD: calculate whether to show entry last

Wait until it has been decided what kind of task the entry actually is.
This commit is contained in:
Christian Göttsche 2021-06-13 11:19:50 +02:00 committed by Benny Baumann
parent af0b67ccd2
commit 3451b6c6b8
1 changed files with 2 additions and 2 deletions

View File

@ -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++;