Subject: Re: HEADS UP: merging the newlock2 branch
To: Andrew Doran <ad@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: current-users
Date: 02/11/2007 01:29:43
Hello,
top(1) doesn't show system processes in [].
% top -b 100 | grep swapper
0 root -18 0 0K 11M schedule 0:00 0.00% 0.00% swapper
Is this change correct?
best regards.
--
Kouichirou Hiratsuka
hira@po6.nsk.ne.jp
Index: m_netbsd15.c
===================================================================
RCS file: /cvsroot/src/usr.bin/top/machine/m_netbsd15.c,v
retrieving revision 1.26
diff -u -r1.26 m_netbsd15.c
--- m_netbsd15.c 9 Feb 2007 22:08:49 -0000 1.26
+++ m_netbsd15.c 10 Feb 2007 15:39:31 -0000
@@ -496,10 +496,10 @@
/*
* Place pointers to each valid proc structure in pref[].
* Process slots that are actually in use have a non-zero
- * status field. Processes with P_SYSTEM set are system
+ * status field. Processes with KP_SYSTEM set are system
* processes---these get ignored unless show_sysprocs is set.
*/
- if (pp->p_stat != 0 && (show_system || ((pp->p_flag & P_SYSTEM) == 0))) {
+ if (pp->p_stat != 0 && (show_system || ((pp->p_flag & KP_SYSTEM) == 0))) {
total_procs++;
process_states[(unsigned char) pp->p_stat]++;
if (pp->p_stat != LSZOMB &&
@@ -554,7 +554,7 @@
/* get the process's user struct and set cputime */
if ((pp->p_flag & L_INMEM) == 0)
pretty = "<>";
- else if ((pp->p_flag & P_SYSTEM) != 0)
+ else if ((pp->p_flag & KP_SYSTEM) != 0)
pretty = "[]";
if (pretty[0] != '\0') {