summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-10 00:38:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-03-10 00:38:35 +0000
commit201b6432c33c1c76e15a496d5d7427e090f0639b (patch)
tree21cb91d35c578b354c308b9bcf65654e03ec43cc /nuttx/arch/sh/src
parentad9a0c7bb97d5f69e8e1038b20f5536b168d5295 (diff)
downloadpx4-nuttx-201b6432c33c1c76e15a496d5d7427e090f0639b.tar.gz
px4-nuttx-201b6432c33c1c76e15a496d5d7427e090f0639b.tar.bz2
px4-nuttx-201b6432c33c1c76e15a496d5d7427e090f0639b.zip
Back out part of the last change -- that was a bad idea
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1585 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src')
-rw-r--r--nuttx/arch/sh/src/common/up_reprioritizertr.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/nuttx/arch/sh/src/common/up_reprioritizertr.c b/nuttx/arch/sh/src/common/up_reprioritizertr.c
index 58ba7a0d6..230dbfff7 100644
--- a/nuttx/arch/sh/src/common/up_reprioritizertr.c
+++ b/nuttx/arch/sh/src/common/up_reprioritizertr.c
@@ -85,27 +85,14 @@ void up_reprioritize_rtr(_TCB *tcb, ubyte priority)
{
/* Verify that the caller is sane */
-#if CONFIG_DEBUG /* We only check parameters when debug is enabled */
- if (priority < SCHED_PRIORITY_MIN ||
+ if (tcb->task_state < FIRST_READY_TO_RUN_STATE ||
+ tcb->task_state > LAST_READY_TO_RUN_STATE ||
+ priority < SCHED_PRIORITY_MIN ||
priority > SCHED_PRIORITY_MAX)
{
PANIC(OSERR_BADREPRIORITIZESTATE);
}
else
-#endif
- if (tcb->task_state < FIRST_READY_TO_RUN_STATE ||
- tcb->task_state > LAST_READY_TO_RUN_STATE)
- {
- /* This is a hack and needs to be fixed.. here some taks is reprioritizing
- * another task that is not running. Here we just set the priority of
- * the task -- BUT some of the other states are also prioritized and the
- * waiting task should also be re-ordered in the prioritized wiating list.
- * As a consequence, the other task is still waiting at the lower priority.
- */
-
- tcb->sched_priority = priority;
- }
- else
{
_TCB *rtcb = (_TCB*)g_readytorun.head;
boolean switch_needed;