mirror of https://github.com/xzeldon/htop.git
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:
parent
af0b67ccd2
commit
3451b6c6b8
|
@ -495,8 +495,6 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
|
||||||
Process* proc = ProcessList_getProcess(super, kproc->ki_pid, &preExisting, FreeBSDProcess_new);
|
Process* proc = ProcessList_getProcess(super, kproc->ki_pid, &preExisting, FreeBSDProcess_new);
|
||||||
FreeBSDProcess* fp = (FreeBSDProcess*) proc;
|
FreeBSDProcess* fp = (FreeBSDProcess*) proc;
|
||||||
|
|
||||||
proc->show = ! ((hideKernelThreads && Process_isKernelThread(proc)) || (hideUserlandThreads && Process_isUserlandThread(proc)));
|
|
||||||
|
|
||||||
if (!preExisting) {
|
if (!preExisting) {
|
||||||
fp->jid = kproc->ki_jid;
|
fp->jid = kproc->ki_jid;
|
||||||
proc->pid = kproc->ki_pid;
|
proc->pid = kproc->ki_pid;
|
||||||
|
@ -592,6 +590,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
|
||||||
if (Process_isKernelThread(proc))
|
if (Process_isKernelThread(proc))
|
||||||
super->kernelThreads++;
|
super->kernelThreads++;
|
||||||
|
|
||||||
|
proc->show = ! ((hideKernelThreads && Process_isKernelThread(proc)) || (hideUserlandThreads && Process_isUserlandThread(proc)));
|
||||||
|
|
||||||
super->totalTasks++;
|
super->totalTasks++;
|
||||||
if (proc->state == 'R')
|
if (proc->state == 'R')
|
||||||
super->runningTasks++;
|
super->runningTasks++;
|
||||||
|
|
Loading…
Reference in New Issue