Use sched_setparam(), not up_reprioritize_rtr()

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1586 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-03-10 00:40:09 +00:00
parent 93355c7e40
commit 5baa73f8e8
1 changed files with 5 additions and 2 deletions

View File

@ -177,11 +177,14 @@ int sem_wait(FAR sem_t *sem)
* will occur during up_block_task() processing.
*
* NOTE that we have to restore base_priority because
* up_reprioritize_rtr() should set both.
* sched_setparam() should set both.
*/
struct sched_param sparam;
int base_priority = htcb->base_priority;
up_reprioritize_rtr(htcb, rtcb->sched_priority);
sparam.sched_priority = rtcb->sched_priority;
(void)sched_setparam(htcb->pid, &sparam);
htcb->base_priority = base_priority;
}
#endif