Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2002 12:49:43 -0700 (PDT)
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 12093 for review
Message-ID:  <200205291949.g4TJnhg80790@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12093

Change 12093 by julian@julian_ref on 2002/05/29 12:48:42

	More patches to libkvm

Affected files ...

... //depot/projects/kse/lib/libkvm/kvm_proc.c#13 edit

Differences ...

==== //depot/projects/kse/lib/libkvm/kvm_proc.c#13 (text+ko) ====

@@ -337,13 +337,16 @@
 				kp->ki_stat = SSLEEP;
 			} else if (P_SHOULDSTOP(&proc)) {
 				kp->ki_stat = SSTOP;
+			} else if (td->td_state == TDS_MTX) {
+				kp->ki_stat = SMTX;
+			} else {
+				kp->ki_stat = SWAIT;
 			}
 		} else (proc.p_state == PRS_ZOMBIE) {
 			kp->ki_stat = SZOMB;
 		} else {
 			kp->ki_stat = SIDL;
 		}
-		kp->ki_stat = proc.p_state;
 		kp->ki_pri.pri_class = proc.p_ksegrp.kg_pri_class; /* XXXKSE */
 		kp->ki_pri.pri_user = proc.p_ksegrp.kg_user_pri; /* XXXKSE */
 		kp->ki_pri.pri_level = mainthread.td_priority;	/* XXXKSE */
@@ -758,7 +761,7 @@
 	if (sysctl(mib, 4, &newkp, &len, NULL, 0) == -1)
 		return (0);
 	return (curkp->ki_pid == newkp.ki_pid &&
-	    (newkp.ki_stat != PRS_ZOMBIE || curkp->ki_stat == PRS_ZOMBIE));
+	    (newkp.ki_stat != SZOMB || curkp->ki_stat == SZOMB));
 }
 
 static char **
@@ -785,7 +788,7 @@
 	/*
 	 * Pointers are stored at the top of the user stack.
 	 */
-	if (kp->ki_stat == PRS_ZOMBIE ||
+	if (kp->ki_stat == SZOMB ||
 	    kvm_uread(kd, kp, ps_strings, (char *)&arginfo,
 		      sizeof(arginfo)) != sizeof(arginfo))
 		return (0);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205291949.g4TJnhg80790>