From e7f807a217bdd9a9b84bb9367fde60fa069bb9ac Mon Sep 17 00:00:00 2001 From: John Hay Date: Thu, 22 Apr 1999 14:34:53 +0000 Subject: [PATCH] Fix the display of the "nice" value of processes like ntpd that use the posix sched_setscheduler() to set their priority. Noticed by: Mark Allwright --- usr.bin/top/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index f7ad95a0488..bef47d23765 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -19,7 +19,7 @@ * Steven Wallace * Wolfram Schneider * - * $Id: machine.c,v 1.22 1999/03/05 16:38:13 bde Exp $ + * $Id: machine.c,v 1.23 1999/03/07 06:55:47 bde Exp $ */ @@ -620,7 +620,7 @@ char *(*get_userid)(); */ (PP(pp, p_rtprio.type) == RTP_PRIO_NORMAL ? PP(pp, p_nice) - NZERO : - (PP(pp, p_rtprio.type) == RTP_PRIO_REALTIME ? + (RTP_PRIO_IS_REALTIME(PP(pp, p_rtprio.type)) ? (PRIO_MIN - 1 - RTP_PRIO_MAX + PP(pp, p_rtprio.prio)) : (PRIO_MAX + 1 + PP(pp, p_rtprio.prio)))), format_k2(PROCSIZE(pp)),