diff options
author | julian <julian@FreeBSD.org> | 2002-09-11 08:13:56 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-09-11 08:13:56 +0000 |
commit | 5702a380a53c99a00275cb7e2836033a7497bef8 (patch) | |
tree | 10514ece7d621a24c034e4c778c793b9ea2d9675 /sys/kern/kern_proc.c | |
parent | 58f594ebe3d58d1f0905309bd8494e4e9549d121 (diff) | |
download | FreeBSD-src-5702a380a53c99a00275cb7e2836033a7497bef8.zip FreeBSD-src-5702a380a53c99a00275cb7e2836033a7497bef8.tar.gz |
Completely redo thread states.
Reviewed by: davidxu@freebsd.org
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 61be8de..2ee4f51 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -854,7 +854,7 @@ fill_kinfo_proc(p, kp) strncpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg) - 1); } - if (td->td_state == TDS_MTX) { + if (TD_ON_MUTEX(td)) { kp->ki_kiflag |= KI_MTXBLOCK; strncpy(kp->ki_mtxname, td->td_mtxname, sizeof(kp->ki_mtxname) - 1); @@ -862,14 +862,14 @@ fill_kinfo_proc(p, kp) } if (p->p_state == PRS_NORMAL) { /* XXXKSE very approximate */ - if ((td->td_state == TDS_RUNQ) || - (td->td_state == TDS_RUNNING)) { + if ((TD_ON_RUNQ(td)) || + (TD_IS_RUNNING(td))) { kp->ki_stat = SRUN; - } else if (td->td_state == TDS_SLP) { + } else if (TD_IS_SLEEPING(td)) { kp->ki_stat = SSLEEP; } else if (P_SHOULDSTOP(p)) { kp->ki_stat = SSTOP; - } else if (td->td_state == TDS_MTX) { + } else if (TD_ON_MUTEX(td)) { kp->ki_stat = SMTX; } else { kp->ki_stat = SWAIT; |