diff --git a/arch/arm/src/common/up_reprioritizertr.c b/arch/arm/src/common/up_reprioritizertr.c
index edc2f9e1f3d0cc6e57219a210ab51b15034d9aa9..2fb7eb631f53aa3580dcdd0eb4a268c2cd08563f 100644
--- a/arch/arm/src/common/up_reprioritizertr.c
+++ b/arch/arm/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;
diff --git a/arch/pjrc-8051/src/up_reprioritizertr.c b/arch/pjrc-8051/src/up_reprioritizertr.c
index 97d5682e08692b1c21d17ee1f4f259cf6126cd93..eef37c16fab0f06a1e51436621856b42dd804f61 100644
--- a/arch/pjrc-8051/src/up_reprioritizertr.c
+++ b/arch/pjrc-8051/src/up_reprioritizertr.c
@@ -85,27 +85,14 @@ void up_reprioritize_rtr(FAR _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
     {
       FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
       boolean switch_needed;
diff --git a/arch/sh/src/common/up_reprioritizertr.c b/arch/sh/src/common/up_reprioritizertr.c
index 58ba7a0d69a2e564f2cfe18b033167b5c25f8d98..230dbfff764a326ae7e16016c895671e1371c859 100644
--- a/arch/sh/src/common/up_reprioritizertr.c
+++ b/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;
diff --git a/arch/sim/src/up_reprioritizertr.c b/arch/sim/src/up_reprioritizertr.c
index f68ff2a828a740d56584e4b99d354058048710a0..307369bf39646eea12f95ee31048e8d28f078e0e 100644
--- a/arch/sim/src/up_reprioritizertr.c
+++ b/arch/sim/src/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;
diff --git a/arch/z16/src/common/up_reprioritizertr.c b/arch/z16/src/common/up_reprioritizertr.c
index 5692ac12c2d9f77c7dd6d54d1c7dc46942632f50..f94d30ad0a71da18a5cd428db10231b7257dec77 100644
--- a/arch/z16/src/common/up_reprioritizertr.c
+++ b/arch/z16/src/common/up_reprioritizertr.c
@@ -89,27 +89,14 @@ void up_reprioritize_rtr(FAR _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
     {
       FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
       boolean switch_needed;
diff --git a/arch/z80/src/common/up_reprioritizertr.c b/arch/z80/src/common/up_reprioritizertr.c
index 73272553e0fc65dc938a86d5cf0cebed72000203..0b71e510f481bc84ccf2f701aa9e08ce21256232 100644
--- a/arch/z80/src/common/up_reprioritizertr.c
+++ b/arch/z80/src/common/up_reprioritizertr.c
@@ -90,27 +90,14 @@ void up_reprioritize_rtr(FAR _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
     {
       FAR _TCB *rtcb = (FAR _TCB*)g_readytorun.head;
       boolean switch_needed;