Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2002 09:43:33 -0700 (PDT)
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 12202 for review
Message-ID:  <200205311643.g4VGhXu48813@freefall.freebsd.org>

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

Change 12202 by julian@julian_ref on 2002/05/31 09:43:28

	fix braino

Affected files ...

... //depot/projects/kse/sys/kern/kern_proc.c#63 edit
... //depot/projects/kse/sys/sys/proc.h#104 edit

Differences ...

==== //depot/projects/kse/sys/kern/kern_proc.c#63 (text+ko) ====

@@ -717,9 +717,10 @@
 	}
 	td = FIRST_THREAD_IN_PROC(p);
 	if (!(p->p_flag & P_KSES)) {
-		if (td->td_wmesg != NULL)
+		if (td->td_wmesg != NULL) {
 			strncpy(kp->ki_wmesg, td->td_wmesg,
 			    sizeof(kp->ki_wmesg) - 1);
+		}
 		if (td->td_state == TDS_MTX) {
 			kp->ki_kiflag |= KI_MTXBLOCK;
 			strncpy(kp->ki_mtxname, td->td_mtxname,
@@ -728,10 +729,10 @@
 	}
 
 	if (p->p_state == PRS_NORMAL) { /*  XXXKSE very aproximate */
-		if ((td->td_state == TDS_RUN) ||
+		if ((td->td_state == TDS_RUNQ) ||
 		    (td->td_state == TDS_RUNNING)) {
 			kp->ki_stat = SRUN;
-		} else if (td->td_state == TDS_SLEEP) {
+		} else if (td->td_state == TDS_SLP) {
 			kp->ki_stat = SSLEEP;
 		} else if (P_SHOULDSTOP(p)) {
 			kp->ki_stat = SSTOP;
@@ -740,7 +741,7 @@
 		} else {
 			kp->ki_stat = SWAIT;
 		}
-	} else (p->p_state == PRS_ZOMBIE) {
+	} else if (p->p_state == PRS_ZOMBIE) {
 		kp->ki_stat = SZOMB;
 	} else {
 		kp->ki_stat = SIDL;

==== //depot/projects/kse/sys/sys/proc.h#104 (text+ko) ====

@@ -557,7 +557,7 @@
 #define	PS_SWAPPING	0x00200	/* Process is being swapped. */
 #define	PS_NEEDSIGCHK	0x02000	/* Process may need signal delivery. */
 
-#ifndef _KERNEL /* Only usable by libkvm for legacy apps */
+/* used only in legacy conversion code */
 #define SIDL	1		/* Process being created by fork. */
 #define SRUN	2		/* Currently runnable. */
 #define SSLEEP	3		/* Sleeping on an address. */
@@ -565,7 +565,6 @@
 #define SZOMB	5		/* Awaiting collection by parent. */
 #define SWAIT	6		/* Waiting for interrupt. */
 #define SMTX	7		/* Blocked on a mutex. */
-#endif
 
 #define	P_MAGIC		0xbeefface
 

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?200205311643.g4VGhXu48813>