summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-10 00:40:09 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-10 00:40:09 +0000
commit422a71a719d024d6bb49bd2faa0666b7a7c5826f (patch)
tree4c2c7f84982fcd233728b4c370c22c2e99130f7d
parent201b6432c33c1c76e15a496d5d7427e090f0639b (diff)
downloadpx4-nuttx-422a71a719d024d6bb49bd2faa0666b7a7c5826f.tar.gz
px4-nuttx-422a71a719d024d6bb49bd2faa0666b7a7c5826f.tar.bz2
px4-nuttx-422a71a719d024d6bb49bd2faa0666b7a7c5826f.zip
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
-rw-r--r--nuttx/sched/sem_wait.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nuttx/sched/sem_wait.c b/nuttx/sched/sem_wait.c
index 9facd861f..0f8fd2716 100644
--- a/nuttx/sched/sem_wait.c
+++ b/nuttx/sched/sem_wait.c
@@ -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