From fd4a6d10a4ee3b00bba4c0493227f2047a1879ae Mon Sep 17 00:00:00 2001 From: David Xu Date: Fri, 25 Aug 2006 10:05:30 +0000 Subject: [PATCH] Same as previous change, the user provided priority should be reversed too. --- sys/kern/kern_thr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index ba3c5fb75fee..ee710e981e1e 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -223,13 +223,13 @@ create_thread(struct thread *td, mcontext_t *ctx, switch (sched->policy) { case SCHED_FIFO: rtp.type = PRI_FIFO; - rtp.prio = sched->param.sched_priority; + rtp.prio = RTP_PRIO_MAX - sched->param.sched_priority; rtp_to_pri(&rtp, newkg); sched_prio(newtd, newkg->kg_user_pri); break; case SCHED_RR: rtp.type = PRI_REALTIME; - rtp.prio = sched->param.sched_priority; + rtp.prio = RTP_PRIO_MAX - sched->param.sched_priority; rtp_to_pri(&rtp, newkg); sched_prio(newtd, newkg->kg_user_pri); break;