diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:25 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:25 +0200 |
commit | 1767b21eb219fb9ac332aca9f7c3abecd97b6b39 (patch) | |
tree | 95ac07953f40ebbd6a674024ad4fc6b9f952e1f9 /Process.h | |
parent | c74c38760df69bb87e93dff18cf91464e5d02f37 (diff) | |
download | debian_htop-1767b21eb219fb9ac332aca9f7c3abecd97b6b39.tar.gz debian_htop-1767b21eb219fb9ac332aca9f7c3abecd97b6b39.tar.bz2 debian_htop-1767b21eb219fb9ac332aca9f7c3abecd97b6b39.zip |
Imported Upstream version 0.8.1+svn149upstream/0.8.1+svn149
Diffstat (limited to 'Process.h')
-rw-r--r-- | Process.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -31,13 +31,16 @@ in the source distribution for its full text. #include <pwd.h> #include <sched.h> +#ifdef HAVE_PLPA #include <plpa.h> +#endif // This works only with glibc 2.1+. On earlier versions // the behavior is similar to have a hardcoded page size. #ifndef PAGE_SIZE -#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) / 1024 ) +#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) ) #endif +#define PAGE_SIZE_KB ( PAGE_SIZE / ONE_K ) #define PROCESS_COMM_LEN 300 @@ -49,7 +52,7 @@ typedef enum ProcessField_ { PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM, USER, TIME, NLWP, TGID, #ifdef HAVE_OPENVZ - VEID, VPID, + CTID, VPID, #endif #ifdef HAVE_VSERVER VXID, @@ -126,7 +129,7 @@ typedef struct Process_ { float percent_mem; char* user; #ifdef HAVE_OPENVZ - unsigned int veid; + unsigned int ctid; unsigned int vpid; #endif #ifdef HAVE_VSERVER @@ -172,9 +175,11 @@ void Process_toggleTag(Process* this); bool Process_setPriority(Process* this, int priority); +#ifdef HAVE_PLPA unsigned long Process_getAffinity(Process* this); bool Process_setAffinity(Process* this, unsigned long mask); +#endif void Process_sendSignal(Process* this, int signal); |