diff options
author | Eugene V. Lyubimkin <jackyf.devel@gmail.com> | 2008-11-16 20:36:18 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:23 +0200 |
commit | bcb965d78ae0b4599fe77a2d641b3ff035658fc9 (patch) | |
tree | 59066e7fa5473b02eefaea37ac015cfaea7cd7c6 /Process.h | |
parent | 2eabf3432b05b93ce4de9af283ae549d0f7c18c8 (diff) | |
parent | c74c38760df69bb87e93dff18cf91464e5d02f37 (diff) | |
download | debian_htop-bcb965d78ae0b4599fe77a2d641b3ff035658fc9.tar.gz debian_htop-bcb965d78ae0b4599fe77a2d641b3ff035658fc9.tar.bz2 debian_htop-bcb965d78ae0b4599fe77a2d641b3ff035658fc9.zip |
Imported Debian patch 0.8.1-1debian/0.8.1-1
Diffstat (limited to 'Process.h')
-rw-r--r-- | Process.h | 47 |
1 files changed, 34 insertions, 13 deletions
@@ -14,6 +14,7 @@ in the source distribution for its full text. #include "Object.h" #include "CRT.h" #include "String.h" +#include "RichString.h" #include "debug.h" @@ -30,6 +31,8 @@ in the source distribution for its full text. #include <pwd.h> #include <sched.h> +#include <plpa.h> + // This works only with glibc 2.1+. On earlier versions // the behavior is similar to have a hardcoded page size. #ifndef PAGE_SIZE @@ -48,6 +51,12 @@ typedef enum ProcessField_ { #ifdef HAVE_OPENVZ VEID, VPID, #endif + #ifdef HAVE_VSERVER + VXID, + #endif + #ifdef HAVE_TASKSTATS + RCHAR, WCHAR, SYSCR, SYSCW, RBYTES, WBYTES, CNCLWB, IO_READ_RATE, IO_WRITE_RATE, IO_RATE, + #endif LAST_PROCESSFIELD } ProcessField; @@ -120,6 +129,22 @@ typedef struct Process_ { unsigned int veid; unsigned int vpid; #endif + #ifdef HAVE_VSERVER + unsigned int vxid; + #endif + #ifdef HAVE_TASKSTATS + unsigned long long io_rchar; + unsigned long long io_wchar; + unsigned long long io_syscr; + unsigned long long io_syscw; + unsigned long long io_read_bytes; + unsigned long long io_write_bytes; + unsigned long long io_cancelled_write_bytes; + double io_rate_read_bps; + unsigned long long io_rate_read_time; + double io_rate_write_bps; + unsigned long long io_rate_write_time; + #endif } Process; @@ -131,34 +156,30 @@ extern char* PROCESS_CLASS; extern char *Process_fieldNames[]; -Process* Process_new(struct ProcessList_ *pl); +extern char *Process_fieldTitles[]; -Process* Process_clone(Process* this); +#define ONE_K 1024 +#define ONE_M (ONE_K * ONE_K) +#define ONE_G (ONE_M * ONE_K) void Process_delete(Object* cast); -void Process_display(Object* cast, RichString* out); +Process* Process_new(struct ProcessList_ *pl); + +Process* Process_clone(Process* this); void Process_toggleTag(Process* this); -void Process_setPriority(Process* this, int priority); +bool Process_setPriority(Process* this, int priority); unsigned long Process_getAffinity(Process* this); -void Process_setAffinity(Process* this, unsigned long mask); +bool Process_setAffinity(Process* this, unsigned long mask); void Process_sendSignal(Process* this, int signal); -#define ONE_K 1024 -#define ONE_M (ONE_K * ONE_K) -#define ONE_G (ONE_M * ONE_K) - -void Process_writeField(Process* this, RichString* str, ProcessField field); - int Process_pidCompare(const void* v1, const void* v2); int Process_compare(const void* v1, const void* v2); -char* Process_printField(ProcessField field); - #endif |