summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2010-02-22 20:57:25 +0000
committerHisham Muhammad <hisham@gobolinux.org>2010-02-22 20:57:25 +0000
commitef31893067f936cec512a9ab2edc4c95b5bc893a (patch)
tree4be18b2dbc4104866d6a33100f7c7db2b89739fd /Process.c
parentc9e59b4a339522f01dcaa883989656f31534a124 (diff)
minor tweak
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Process.c b/Process.c
index 8f3762cf..a63f2671 100644
--- a/Process.c
+++ b/Process.c
@@ -43,6 +43,10 @@ in the source distribution for its full text.
/*{
+#ifndef Process_isThread
+#define Process_isThread(_process) (_process->pid != _process->tgid || _process->m_size == 0)
+#endif
+
typedef enum ProcessField_ {
PID = 1, COMM, STATE, PPID, PGRP, SESSION, TTY_NR, TPGID, FLAGS, MINFLT, CMINFLT, MAJFLT, CMAJFLT, UTIME,
STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE,
@@ -303,7 +307,7 @@ static void Process_writeField(Process* this, RichString* str, ProcessField fiel
case PROCESSOR: snprintf(buffer, n, "%3d ", this->processor+1); break;
case NLWP: snprintf(buffer, n, "%4ld ", this->nlwp); break;
case COMM: {
- if (this->pl->highlightThreads && (this->pid != this->tgid || this->m_size == 0)) {
+ if (this->pl->highlightThreads && Process_isThread(this)) {
attr = CRT_colors[PROCESS_THREAD];
baseattr = CRT_colors[PROCESS_THREAD_BASENAME];
}

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