diff options
Diffstat (limited to 'sys/fs/procfs/procfs_status.c')
-rw-r--r-- | sys/fs/procfs/procfs_status.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_status.c b/sys/fs/procfs/procfs_status.c index 44772d3..1b8de12 100644 --- a/sys/fs/procfs/procfs_status.c +++ b/sys/fs/procfs/procfs_status.c @@ -127,9 +127,11 @@ procfs_doprocstatus(PFS_FILL_ARGS) if (p->p_flag & P_KSES) { sbuf_printf(sb, " %s", "-kse- "); } else { + struct thread *td; + td = FIRST_THREAD_IN_PROC(p); sbuf_printf(sb, " %s", - (p->p_thread.td_wchan && p->p_thread.td_wmesg) ? - p->p_thread.td_wmesg : "nochan"); + (td->td_wchan && td->td_wmesg) ? + td->td_wmesg : "nochan"); } cr = p->p_ucred; |