From 1c8ce22e5d383d7649ad0b96cc2c43882b0b438b Mon Sep 17 00:00:00 2001 From: jeff Date: Sat, 12 Apr 2003 07:00:16 +0000 Subject: [PATCH] - We only care about the base priority. Ignore the SCHED_FIFO_BIT so that we dont get confused. Reported and debugged by: Steve Kargl --- sys/kern/sched_ule.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 69241c2f9d63..03b0e9300124 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -268,7 +268,7 @@ kseq_print(struct kseq *kseq) static void kseq_add(struct kseq *kseq, struct kse *ke) { - kseq->ksq_loads[ke->ke_ksegrp->kg_pri_class]++; + kseq->ksq_loads[PRI_BASE(ke->ke_ksegrp->kg_pri_class)]++; kseq->ksq_load++; if (ke->ke_ksegrp->kg_pri_class == PRI_TIMESHARE) CTR6(KTR_ULE, "Add kse %p to %p (slice: %d, pri: %d, nice: %d(%d))", @@ -284,7 +284,7 @@ kseq_add(struct kseq *kseq, struct kse *ke) static void kseq_rem(struct kseq *kseq, struct kse *ke) { - kseq->ksq_loads[ke->ke_ksegrp->kg_pri_class]--; + kseq->ksq_loads[PRI_BASE(ke->ke_ksegrp->kg_pri_class)]--; kseq->ksq_load--; ke->ke_runq = NULL; if (ke->ke_ksegrp->kg_pri_class == PRI_TIMESHARE) @@ -817,8 +817,8 @@ sched_class(struct ksegrp *kg, int class) continue; kseq = KSEQ_CPU(ke->ke_cpu); - kseq->ksq_loads[kg->kg_pri_class]--; - kseq->ksq_loads[class]++; + kseq->ksq_loads[PRI_BASE(kg->kg_pri_class)]--; + kseq->ksq_loads[PRI_BASE(class)]++; if (kg->kg_pri_class == PRI_TIMESHARE) kseq_nice_rem(kseq, kg->kg_nice); @@ -1068,7 +1068,7 @@ sched_add(struct kse *ke) if (ke->ke_runq) Debugger("hrm?"); - switch (kg->kg_pri_class) { + switch (PRI_BASE(kg->kg_pri_class)) { case PRI_ITHD: case PRI_REALTIME: kseq = KSEQ_SELF();