Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Update for SDEAD.



details:   https://anonhg.NetBSD.org/src/rev/66380887271c
branches:  trunk
changeset: 474841:66380887271c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jul 22 18:16:05 1999 +0000

description:
Update for SDEAD.

diffstat:

 bin/ps/print.c                   |  13 +++++++------
 usr.bin/systat/pigs.c            |   6 +++---
 usr.bin/systat/ps.c              |   9 +++++----
 usr.bin/top/machine/m_netbsd13.c |  13 +++++++------
 4 files changed, 22 insertions(+), 19 deletions(-)

diffs (168 lines):

diff -r ed52e7a2ba29 -r 66380887271c bin/ps/print.c
--- a/bin/ps/print.c    Thu Jul 22 18:13:36 1999 +0000
+++ b/bin/ps/print.c    Thu Jul 22 18:16:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.41 1999/05/03 00:17:30 mrg Exp $   */
+/*     $NetBSD: print.c,v 1.42 1999/07/22 18:16:05 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)print.c    8.6 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: print.c,v 1.41 1999/05/03 00:17:30 mrg Exp $");
+__RCSID("$NetBSD: print.c,v 1.42 1999/07/22 18:16:05 thorpej Exp $");
 #endif
 #endif /* not lint */
 
@@ -251,6 +251,7 @@
                break;
 
        case SZOMB:
+       case SDYING:
                *cp = 'Z';
                break;
 
@@ -267,7 +268,7 @@
                *cp++ = 'N';
        if (flag & P_TRACED)
                *cp++ = 'X';
-       if (flag & P_WEXIT && p->p_stat != SZOMB)
+       if (flag & P_WEXIT && P_ZOMBIE(p) == 0)
                *cp++ = 'E';
        if (flag & P_PPWAIT)
                *cp++ = 'V';
@@ -510,7 +511,7 @@
        char obuff[128];
 
        v = ve->var;
-       if (KI_PROC(k)->p_stat == SZOMB || !k->ki_u.u_valid) {
+       if (P_ZOMBIE(KI_PROC(k)) || k->ki_u.u_valid == 0) {
                secs = 0;
                psecs = 0;
        } else {
@@ -555,8 +556,8 @@
 #define        fxtofl(fixpt)   ((double)(fixpt) / fscale)
 
        /* XXX - I don't like this */
-       if (p->p_swtime == 0 || (p->p_flag & P_INMEM) == 0
-           || p->p_stat == SZOMB)
+       if (p->p_swtime == 0 || (p->p_flag & P_INMEM) == 0 ||
+           P_ZOMBIE(p))
                return (0.0);
        if (rawcpu)
                return (100.0 * fxtofl(p->p_pctcpu));
diff -r ed52e7a2ba29 -r 66380887271c usr.bin/systat/pigs.c
--- a/usr.bin/systat/pigs.c     Thu Jul 22 18:13:36 1999 +0000
+++ b/usr.bin/systat/pigs.c     Thu Jul 22 18:16:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pigs.c,v 1.14 1999/04/24 23:36:36 ross Exp $   */
+/*     $NetBSD: pigs.c,v 1.15 1999/07/22 18:18:27 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)pigs.c     8.2 (Berkeley) 9/23/93";
 #endif
-__RCSID("$NetBSD: pigs.c,v 1.14 1999/04/24 23:36:36 ross Exp $");
+__RCSID("$NetBSD: pigs.c,v 1.15 1999/07/22 18:18:27 thorpej Exp $");
 #endif /* not lint */
 
 /*
@@ -220,7 +220,7 @@
                pp = &kpp[i].kp_proc;
                pctp = &pt[i].pt_pctcpu;
                time = pp->p_swtime;
-               if (pp->p_stat == SZOMB ||
+               if (P_ZOMBIE(pp) ||
                    time == 0 || (pp->p_flag & P_INMEM) == 0)
                        *pctp = 0;
                else
diff -r ed52e7a2ba29 -r 66380887271c usr.bin/systat/ps.c
--- a/usr.bin/systat/ps.c       Thu Jul 22 18:13:36 1999 +0000
+++ b/usr.bin/systat/ps.c       Thu Jul 22 18:16:05 1999 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: ps.c,v 1.3 1999/06/19 05:35:14 itohy Exp $  */
+/*      $NetBSD: ps.c,v 1.4 1999/07/22 18:18:27 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1999
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ps.c,v 1.3 1999/06/19 05:35:14 itohy Exp $");
+__RCSID("$NetBSD: ps.c,v 1.4 1999/07/22 18:18:27 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -179,6 +179,7 @@
                break;
 
        case SZOMB:
+       case SDYING:
                *cp = 'Z';
                break;
 
@@ -195,7 +196,7 @@
                *cp++ = 'N';
        if (flag & P_TRACED)
                *cp++ = 'X';
-       if (flag & P_WEXIT && p->p_stat != SZOMB)
+       if (flag & P_WEXIT && P_ZOMBIE(p) == 0)
                *cp++ = 'E';
        if (flag & P_PPWAIT)
                *cp++ = 'V';
@@ -355,7 +356,7 @@
 
        p = &(kp->kp_proc);
                
-       if (p->p_stat == SZOMB) {
+       if (P_ZOMBIE(p)) {
                secs = 0;
                psecs = 0;
        } else {
diff -r ed52e7a2ba29 -r 66380887271c usr.bin/top/machine/m_netbsd13.c
--- a/usr.bin/top/machine/m_netbsd13.c  Thu Jul 22 18:13:36 1999 +0000
+++ b/usr.bin/top/machine/m_netbsd13.c  Thu Jul 22 18:16:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: m_netbsd13.c,v 1.5 1999/06/28 22:13:04 tron Exp $      */
+/*     $NetBSD: m_netbsd13.c,v 1.6 1999/07/22 18:23:01 thorpej Exp $   */
 
 /*
  * top - a top users display for Unix
@@ -34,7 +34,7 @@
  *             matthew green <mrg%eterna.com.au@localhost>
  *
  *
- * $Id: m_netbsd13.c,v 1.5 1999/06/28 22:13:04 tron Exp $
+ * $Id: m_netbsd13.c,v 1.6 1999/07/22 18:23:01 thorpej Exp $
  */
 #define UVM
 
@@ -479,7 +479,7 @@
        {
            total_procs++;
            process_states[(unsigned char) PP(pp, p_stat)]++;
-           if ((PP(pp, p_stat) != SZOMB) &&
+           if ((PP(pp, p_stat) != SZOMB && PP(pp, p_stat) != SDYING) &&
                (show_idle || (PP(pp, p_pctcpu) != 0) || 
                 (PP(pp, p_stat) == SRUN)) &&
                (!show_uid || EP(pp, e_pcred.p_ruid) == (uid_t)sel->uid))
@@ -690,10 +690,11 @@
 
 static int sorted_state[] = {
     0, /*  (not used)    ?     */
-    4, /* "start"      SIDL    */
-    5, /* "run"        SRUN    */
-    2, /* "sleep"      SSLEEP  */
+    5, /* "start"      SIDL    */
+    4, /* "run"        SRUN    */
+    3, /* "sleep"      SSLEEP  */
     3, /* "stop"       SSTOP   */
+    2, /* "dying"      SDYING  */
     1, /* "zomb"       SZOMB   */
 };
 



Home | Main Index | Thread Index | Old Index