From 124619453d9830687c7c3ea9546afc1d026ad6db Mon Sep 17 00:00:00 2001 From: gad Date: Wed, 23 Jun 2004 11:56:57 +0000 Subject: Make sure the value of "upr" (scheduling priority on return from system call) is scaled in the same way that "pri" (scheduling priority) is scaled. Submitted by: Cyrille Lefevre --- bin/ps/print.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bin/ps/print.c') diff --git a/bin/ps/print.c b/bin/ps/print.c index de5c69b..0f2b14a 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -265,14 +265,26 @@ state(KINFO *k, VARENT *ve) (void)printf("%-*s", v->width, buf); } +#define scalepri(x) ((x) - PZERO) + void pri(KINFO *k, VARENT *ve) { VAR *v; v = ve->var; - (void)printf("%*d", v->width, k->ki_p->ki_pri.pri_level - PZERO); + (void)printf("%*d", v->width, scalepri(k->ki_p->ki_pri.pri_level)); +} + +void +upr(KINFO *k, VARENT *ve) +{ + VAR *v; + + v = ve->var; + (void)printf("%*d", v->width, scalepri(k->ki_p->ki_pri.pri_user)); } +#undef scalepri void uname(KINFO *k, VARENT *ve) -- cgit v1.1