diff options
author | kib <kib@FreeBSD.org> | 2016-02-09 16:30:16 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-02-09 16:30:16 +0000 |
commit | 736e07849585def123cc8c3042c05c77f3d11e2e (patch) | |
tree | f8a43f8ccb9814c0d0a87fe0c006c312c7b28e59 /usr.bin/top | |
parent | 6b818b637142586b9543f3a199b15896650af307 (diff) | |
download | FreeBSD-src-736e07849585def123cc8c3042c05c77f3d11e2e.zip FreeBSD-src-736e07849585def123cc8c3042c05c77f3d11e2e.tar.gz |
Rename P_KTHREAD struct proc p_flag to P_KPROC.
I left as is an apparent bug in ntoskrnl_var.h:AT_PASSIVE_LEVEL()
definition.
Suggested by: jhb
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.bin/top')
-rw-r--r-- | usr.bin/top/machine.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 20be935..0ae2ae7 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1160,7 +1160,7 @@ format_nice(const struct kinfo_proc *pp) static char nicebuf[4 + 1]; fifo = PRI_NEED_RR(pp->ki_pri.pri_class) ? "" : "F"; - kthread = (pp->ki_flag & P_KTHREAD) ? "k" : ""; + kthread = (pp->ki_flag & P_KPROC) ? "k" : ""; switch (PRI_BASE(pp->ki_pri.pri_class)) { case PRI_ITHD: return ("-"); @@ -1185,19 +1185,19 @@ format_nice(const struct kinfo_proc *pp) * values like "kr31F", but such values shouldn't occur, * and if they do then the tailing "F" is not displayed. */ - rtpri = ((pp->ki_flag & P_KTHREAD) ? pp->ki_pri.pri_native : + rtpri = ((pp->ki_flag & P_KPROC) ? pp->ki_pri.pri_native : pp->ki_pri.pri_user) - PRI_MIN_REALTIME; snprintf(nicebuf, sizeof(nicebuf), "%sr%d%s", kthread, rtpri, fifo); break; case PRI_TIMESHARE: - if (pp->ki_flag & P_KTHREAD) + if (pp->ki_flag & P_KPROC) return ("-"); snprintf(nicebuf, sizeof(nicebuf), "%d", pp->ki_nice - NZERO); break; case PRI_IDLE: /* XXX: as above. */ - rtpri = ((pp->ki_flag & P_KTHREAD) ? pp->ki_pri.pri_native : + rtpri = ((pp->ki_flag & P_KPROC) ? pp->ki_pri.pri_native : pp->ki_pri.pri_user) - PRI_MIN_IDLE; snprintf(nicebuf, sizeof(nicebuf), "%si%d%s", kthread, rtpri, fifo); |