From owner-p4-projects Fri May 31 9:43:42 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE18237B403; Fri, 31 May 2002 09:43:34 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8572D37B406 for ; Fri, 31 May 2002 09:43:33 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4VGhXu48813 for perforce@freebsd.org; Fri, 31 May 2002 09:43:33 -0700 (PDT) (envelope-from julian@freebsd.org) Date: Fri, 31 May 2002 09:43:33 -0700 (PDT) Message-Id: <200205311643.g4VGhXu48813@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer Subject: PERFORCE change 12202 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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