summaryrefslogtreecommitdiff
path: root/nuttx/arch/pjrc-8051/src/up_blocktask.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/pjrc-8051/src/up_blocktask.c')
-rw-r--r--nuttx/arch/pjrc-8051/src/up_blocktask.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_blocktask.c b/nuttx/arch/pjrc-8051/src/up_blocktask.c
index 4a15a817a..8a74d0ef0 100644
--- a/nuttx/arch/pjrc-8051/src/up_blocktask.c
+++ b/nuttx/arch/pjrc-8051/src/up_blocktask.c
@@ -125,27 +125,24 @@ void up_block_task(FAR _TCB *tcb, tstate_t task_state)
{
/* Are we in an interrupt handler? */
- 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(&tcb->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(&tcb->xcp);
}
/* Copy the user C context into the TCB at the (old) head of the