diff options
author | dim <dim@FreeBSD.org> | 2016-02-11 20:07:09 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-02-11 20:07:09 +0000 |
commit | afa214d26dae14a294ff215b5a55e9acaf67d18f (patch) | |
tree | d5418788f5368ac552e6ffa543d661830d835dbb /usr.bin | |
parent | 86bef0867f0389dc03d4cd4913f5dee79377226f (diff) | |
parent | 5183fdd185bc8709354de8b0b88b8925644c2a4b (diff) | |
download | FreeBSD-src-afa214d26dae14a294ff215b5a55e9acaf67d18f.zip FreeBSD-src-afa214d26dae14a294ff215b5a55e9acaf67d18f.tar.gz |
Merge ^/head r295351 through r295543.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/top/machine.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 20be935..6c4cee7 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1155,12 +1155,12 @@ getsysctl(const char *name, void *ptr, size_t len) static const char * format_nice(const struct kinfo_proc *pp) { - const char *fifo, *kthread; + const char *fifo, *kproc; int rtpri; static char nicebuf[4 + 1]; fifo = PRI_NEED_RR(pp->ki_pri.pri_class) ? "" : "F"; - kthread = (pp->ki_flag & P_KTHREAD) ? "k" : ""; + kproc = (pp->ki_flag & P_KPROC) ? "k" : ""; switch (PRI_BASE(pp->ki_pri.pri_class)) { case PRI_ITHD: return ("-"); @@ -1185,22 +1185,22 @@ 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); + kproc, 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); + kproc, rtpri, fifo); break; default: return ("?"); |