diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:01:08 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:01:08 +0200 |
commit | 0063095c92e95190a0376ad245509345e5b690ed (patch) | |
tree | 0b8b7f9aac6410df323a3953423e7a1bdd121e1b /unsupported/UnsupportedProcessList.c | |
parent | 43997d37137cc1e4a1a5be654aa16d4992045e34 (diff) | |
parent | ff9409b1737627857eb47f64f536a3f66b6a09a4 (diff) | |
download | debian_htop-0063095c92e95190a0376ad245509345e5b690ed.tar.gz debian_htop-0063095c92e95190a0376ad245509345e5b690ed.tar.bz2 debian_htop-0063095c92e95190a0376ad245509345e5b690ed.zip |
Merge tag 'upstream/2.0.0'
Upstream version 2.0.0
Diffstat (limited to 'unsupported/UnsupportedProcessList.c')
-rw-r--r-- | unsupported/UnsupportedProcessList.c | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c new file mode 100644 index 0000000..b63f267 --- /dev/null +++ b/unsupported/UnsupportedProcessList.c @@ -0,0 +1,75 @@ +/* +htop - UnsupportedProcessList.c +(C) 2014 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ + +#include "ProcessList.h" +#include "UnsupportedProcess.h" + +#include <stdlib.h> +#include <string.h> + +/*{ + +}*/ + +ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId) { + ProcessList* this = xCalloc(1, sizeof(ProcessList)); + ProcessList_init(this, Class(Process), usersTable, pidWhiteList, userId); + + return this; +} + +void ProcessList_delete(ProcessList* this) { + ProcessList_done(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 UnsupportedProcessList_scan(ProcessList* this) { + (void) this; + // stub! +} |