aboutsummaryrefslogtreecommitdiffstats
path: root/unsupported/UnsupportedProcessList.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-12-07 10:26:01 +0100
committerDaniel Lange <DLange@git.local>2020-12-07 10:26:01 +0100
commit65357c8c46154de4e4eca14075bfe5523bb5fc14 (patch)
tree8f430ee5a0d5de377c4e7c94e47842a27c70d7e8 /unsupported/UnsupportedProcessList.c
parentf80394a20254938142011855f2954b3f63fe5909 (diff)
downloaddebian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.gz
debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.bz2
debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.zip
New upstream version 3.0.3upstream/3.0.3
Diffstat (limited to 'unsupported/UnsupportedProcessList.c')
-rw-r--r--unsupported/UnsupportedProcessList.c88
1 files changed, 47 insertions, 41 deletions
diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c
index fc8a54d..098eb48 100644
--- a/unsupported/UnsupportedProcessList.c
+++ b/unsupported/UnsupportedProcessList.c
@@ -1,7 +1,7 @@
/*
htop - UnsupportedProcessList.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
@@ -24,44 +24,50 @@ void ProcessList_delete(ProcessList* this) {
free(this);
}
-void ProcessList_goThroughEntries(ProcessList* super) {
- bool preExisting = true;
- Process *proc;
-
- proc = ProcessList_getProcess(super, 1, &preExisting, UnsupportedProcess_new);
-
- /* Empty values */
- proc->time = proc->time + 10;
- proc->pid = 1;
- proc->ppid = 1;
- proc->tgid = 0;
- proc->comm = "<unsupported architecture>";
- proc->basenameOffset = 0;
- proc->updated = true;
-
- proc->state = 'R';
- proc->show = true; /* Reflected in proc->settings-> "hideXXX" really */
- proc->pgrp = 0;
- proc->session = 0;
- proc->tty_nr = 0;
- proc->tpgid = 0;
- proc->st_uid = 0;
- proc->flags = 0;
- proc->processor = 0;
-
- proc->percent_cpu = 2.5;
- proc->percent_mem = 2.5;
- proc->user = "nobody";
-
- proc->priority = 0;
- proc->nice = 0;
- proc->nlwp = 1;
- strncpy(proc->starttime_show, "Jun 01 ", sizeof(proc->starttime_show));
- proc->starttime_ctime = 1433116800; // Jun 01, 2015
-
- proc->m_size = 100;
- proc->m_resident = 100;
-
- proc->minflt = 20;
- proc->majflt = 20;
+void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
+
+ // in pause mode only gather global data for meters (CPU/memory/...)
+ if (pauseProcessUpdate) {
+ return;
+ }
+
+ bool preExisting = true;
+ Process* proc;
+
+ proc = ProcessList_getProcess(super, 1, &preExisting, UnsupportedProcess_new);
+
+ /* Empty values */
+ proc->time = proc->time + 10;
+ proc->pid = 1;
+ proc->ppid = 1;
+ proc->tgid = 0;
+ proc->comm = "<unsupported architecture>";
+ proc->basenameOffset = 0;
+ proc->updated = true;
+
+ proc->state = 'R';
+ proc->show = true; /* Reflected in proc->settings-> "hideXXX" really */
+ proc->pgrp = 0;
+ proc->session = 0;
+ proc->tty_nr = 0;
+ proc->tpgid = 0;
+ proc->st_uid = 0;
+ proc->flags = 0;
+ proc->processor = 0;
+
+ proc->percent_cpu = 2.5;
+ proc->percent_mem = 2.5;
+ proc->user = "nobody";
+
+ proc->priority = 0;
+ proc->nice = 0;
+ proc->nlwp = 1;
+ proc->starttime_ctime = 1433116800; // Jun 01, 2015
+ Process_fillStarttimeBuffer(proc);
+
+ proc->m_virt = 100;
+ proc->m_resident = 100;
+
+ proc->minflt = 20;
+ proc->majflt = 20;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy