From 1767b21eb219fb9ac332aca9f7c3abecd97b6b39 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:25 +0200 Subject: Imported Upstream version 0.8.1+svn149 --- Process.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Process.h') diff --git a/Process.h b/Process.h index 3cac731..620eb75 100644 --- a/Process.h +++ b/Process.h @@ -31,13 +31,16 @@ in the source distribution for its full text. #include #include +#ifdef HAVE_PLPA #include +#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); -- cgit v1.2.3