aboutsummaryrefslogtreecommitdiff
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-02-12 00:21:38 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-02-12 00:21:38 +0000
commit4c85452ba90a1dba69f0de7c7c871e8976a12f40 (patch)
tree2247bd92ce76909d4729a31a5d31e050d1a705cd /bin/ps/print.c
parentd5a08a6065a153f519dc5ada150c981d37f91345 (diff)
downloadsrc-4c85452ba90a1dba69f0de7c7c871e8976a12f40.tar.gz
src-4c85452ba90a1dba69f0de7c7c871e8976a12f40.zip
Catch up to new priority interface.
Notes
Notes: svn path=/head/; revision=72377
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 ebcce4f02492..72d96cfa41e9 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';