summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-24 11:20:05 +0000
committerjhb <jhb@FreeBSD.org>2001-01-24 11:20:05 +0000
commit963052ead7e125ce4ea469c60e510bf3f8e6909b (patch)
tree2d7e47bd61b910783ef4d022007fc5e87ba4516f /sys/fs/procfs
parenta56633d331d8ebe975bcffca06119e83846e61eb (diff)
downloadFreeBSD-src-963052ead7e125ce4ea469c60e510bf3f8e6909b.zip
FreeBSD-src-963052ead7e125ce4ea469c60e510bf3f8e6909b.tar.gz
- Catch up to proc flag changes.
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_status.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index d7dd108..813ad60 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -123,19 +123,23 @@ procfs_dostatus(curp, p, pfs, uio)
DOCHECK();
}
- if (p->p_flag & P_INMEM) {
+ mtx_enter(&sched_lock, MTX_SPIN);
+ if (p->p_sflag & PS_INMEM) {
struct timeval ut, st;
calcru(p, &ut, &st, (struct timeval *) NULL);
+ mtx_exit(&sched_lock, MTX_SPIN);
ps += snprintf(ps, psbuf + sizeof(psbuf) - ps,
" %ld,%ld %ld,%ld %ld,%ld",
p->p_stats->p_start.tv_sec,
p->p_stats->p_start.tv_usec,
ut.tv_sec, ut.tv_usec,
st.tv_sec, st.tv_usec);
- } else
+ } else {
+ mtx_exit(&sched_lock, MTX_SPIN);
ps += snprintf(ps, psbuf + sizeof(psbuf) - ps,
" -1,-1 -1,-1 -1,-1");
+ }
DOCHECK();
ps += snprintf(ps, psbuf + sizeof(psbuf) - ps, " %s",
OpenPOWER on IntegriCloud