summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-02-12 00:21:38 +0000
committerjake <jake@FreeBSD.org>2001-02-12 00:21:38 +0000
commit0dc4d20fbded3f51c474394a4195ac5168728329 (patch)
treef399d384bf63952565cc2754fb8683f661b500ad /bin/ps/print.c
parent55d5108ac58bdc48fbd9eccefcb58a49682107b5 (diff)
downloadFreeBSD-src-0dc4d20fbded3f51c474394a4195ac5168728329.zip
FreeBSD-src-0dc4d20fbded3f51c474394a4195ac5168728329.tar.gz
Catch up to new priority interface.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index ebcce4f..72d96cf 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -244,7 +244,7 @@ pri(k, ve)
VAR *v;
v = ve->var;
- (void)printf("%*d", v->width, k->ki_p->ki_priority - PZERO);
+ (void)printf("%*d", v->width, k->ki_p->ki_pri.pri_level - PZERO);
}
void
@@ -613,31 +613,31 @@ tsize(k, ve)
}
void
-rtprior(k, ve)
+priorityr(k, ve)
KINFO *k;
VARENT *ve;
{
VAR *v;
- struct rtprio *prtp;
+ struct priority *pri;
char str[8];
- unsigned prio, type;
+ unsigned class, level;
v = ve->var;
- prtp = (struct rtprio *) ((char *)k + v->off);
- prio = prtp->prio;
- type = prtp->type;
- switch (type) {
- case RTP_PRIO_REALTIME:
- snprintf(str, sizeof(str), "real:%u", prio);
+ pri = (struct priority *) ((char *)k + v->off);
+ class = pri->pri_class;
+ level = pri->pri_level;
+ switch (class) {
+ case PRI_REALTIME:
+ snprintf(str, sizeof(str), "real:%u", level);
break;
- case RTP_PRIO_NORMAL:
+ case PRI_TIMESHARE:
strncpy(str, "normal", sizeof(str));
break;
- case RTP_PRIO_IDLE:
- snprintf(str, sizeof(str), "idle:%u", prio);
+ case PRI_IDLE:
+ snprintf(str, sizeof(str), "idle:%u", level);
break;
default:
- snprintf(str, sizeof(str), "%u:%u", type, prio);
+ snprintf(str, sizeof(str), "%u:%u", class, level);
break;
}
str[sizeof(str) - 1] = '\0';
OpenPOWER on IntegriCloud