summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2007-11-08 23:23:01 +0000
committerHisham Muhammad <hisham@gobolinux.org>2007-11-08 23:23:01 +0000
commita7c2aedcecd3763464e83f80bd6c4f1216f58428 (patch)
tree9dad109961beaf321bf352ef58881a0625c893ae /Process.h
parent46631b59fbc01fb65fa752a00ba9382a730aa1aa (diff)
Improve construction of tree view, properly nesting threads.
Add CPU affinity screen ('a' key). BUGFIX: Correct display of TPGID field. Add TGID field.
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Process.h b/Process.h
index 37a20cb9..778d4644 100644
--- a/Process.h
+++ b/Process.h
@@ -28,6 +28,7 @@ in the source distribution for its full text.
#include <string.h>
#include <stdbool.h>
#include <pwd.h>
+#include <sched.h>
// This works only with glibc 2.1+. On earlier versions
// the behavior is similar to have a hardcoded page size.
@@ -43,7 +44,7 @@ typedef enum ProcessField_ {
STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE,
STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SSIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL,
PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM,
- USER, TIME, NLWP,
+ USER, TIME, NLWP, TGID,
#ifdef HAVE_OPENVZ
VEID, VPID,
#endif
@@ -67,7 +68,8 @@ typedef struct Process_ {
unsigned int pgrp;
unsigned int session;
unsigned int tty_nr;
- unsigned int tpgid;
+ unsigned int tgid;
+ int tpgid;
unsigned long int flags;
#ifdef DEBUG
unsigned long int minflt;
@@ -141,6 +143,10 @@ void Process_toggleTag(Process* this);
void Process_setPriority(Process* this, int priority);
+unsigned long Process_getAffinity(Process* this);
+
+void Process_setAffinity(Process* this, unsigned long mask);
+
void Process_sendSignal(Process* this, int signal);
#define ONE_K 1024

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