summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Process.c6
-rw-r--r--Process.h4
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 06867524..79e31608 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
+What's new in version 0.8.4
+
+
+
What's new in version 0.8.3
* BUGFIX: Fix crash on F6 key
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];
}
diff --git a/Process.h b/Process.h
index 620eb75a..c8019d7d 100644
--- a/Process.h
+++ b/Process.h
@@ -45,6 +45,10 @@ in the source distribution for its full text.
#define PROCESS_COMM_LEN 300
+#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,