summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs_status.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs/procfs_status.c')
-rw-r--r--sys/fs/procfs/procfs_status.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c
index 95f2b17..60aa270 100644
--- a/sys/fs/procfs/procfs_status.c
+++ b/sys/fs/procfs/procfs_status.c
@@ -113,6 +113,7 @@ procfs_doprocstatus(PFS_FILL_ARGS)
}
mtx_lock_spin(&sched_lock);
+#ifdef KSE
if (p->p_flag & P_SA)
wmesg = "-kse- ";
else {
@@ -124,6 +125,15 @@ procfs_doprocstatus(PFS_FILL_ARGS)
} else
wmesg = "nochan";
}
+#else
+ tdfirst = FIRST_THREAD_IN_PROC(p);
+ if (tdfirst->td_wchan != NULL) {
+ KASSERT(tdfirst->td_wmesg != NULL,
+ ("wchan %p has no wmesg", tdfirst->td_wchan));
+ wmesg = tdfirst->td_wmesg;
+ } else
+ wmesg = "nochan";
+#endif
mtx_unlock_spin(&sched_lock);
if (p->p_sflag & PS_INMEM) {
OpenPOWER on IntegriCloud