summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/Process.h b/Process.h
index f7d1adf3..88e825e9 100644
--- a/Process.h
+++ b/Process.h
@@ -43,11 +43,17 @@ in the source distribution for its full text.
#endif
#define PAGE_SIZE_KB ( PAGE_SIZE / ONE_K )
-#define PROCESS_COMM_LEN 300
+#ifndef Process_isKernelThread
+#define Process_isKernelThread(_process) (_process->pgrp == 0)
+#endif
+
+#ifndef Process_isUserlandThread
+#define Process_isUserlandThread(_process) (_process->pid != _process->tgid)
+#endif
#ifndef Process_isThread
-#define Process_isThread(_process) (_process->pid != _process->tgid || _process->m_size == 0)
+#define Process_isThread(_process) (Process_isUserlandThread(_process) || Process_isKernelThread(_process))
#endif
typedef enum ProcessField_ {
@@ -85,6 +91,7 @@ typedef struct Process_ {
char state;
bool tag;
bool showChildren;
+ bool show;
pid_t ppid;
unsigned int pgrp;
unsigned int session;