summaryrefslogtreecommitdiff
path: root/nuttx/arch/pjrc-8051/src/up_releasepending.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/pjrc-8051/src/up_releasepending.c')
-rw-r--r--nuttx/arch/pjrc-8051/src/up_releasepending.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_releasepending.c b/nuttx/arch/pjrc-8051/src/up_releasepending.c
index 99c20ec23..64650bc89 100644
--- a/nuttx/arch/pjrc-8051/src/up_releasepending.c
+++ b/nuttx/arch/pjrc-8051/src/up_releasepending.c
@@ -88,27 +88,24 @@ void up_release_pending(void)
* interrupt context:
*/
- if (g_ininterrupt)
+ if (g_irqtos)
{
-#if 0
-# warning REVISIT
/* Yes, then we have to do things differently.
* Just copy the current registers into the OLD rtcb.
*/
- up_copystate(&tcb->xcp, current_regs);
+ up_savestack(&rtcb->xcp);
/* Restore the exception context of the rtcb at the (new) head
* of the g_readytorun task list.
*/
- rtcb = (_TCB*)g_readytorun.head;
+ rtcb = (FAR _TCB*)g_readytorun.head;
dbg("New Active Task TCB=%p\n", rtcb);
/* Then switch contexts */
- up_copystate(current_regs, &tcb->xcp);
-#endif
+ up_restorestack(&rtcb->xcp);
}
/* Copy the exception context into the TCB of the task that