Same as previous change, the user provided priority should be reversed

too.
This commit is contained in:
David Xu 2006-08-25 10:05:30 +00:00
parent cbae88b901
commit fd4a6d10a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161609

View File

@ -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;