diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-02 22:44:29 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-02 22:44:29 +0000 |
commit | 4dce3ece605863986f69cad49477441805882ddd (patch) | |
tree | 32d2cb78dc3b84dd3921eea8042d01d990a93e9a /nuttx/arch/pjrc-8051/src/up_reprioritizertr.c | |
parent | 5288ccf79e6d13f27c18a3fd9765804e8c722968 (diff) | |
download | px4-nuttx-4dce3ece605863986f69cad49477441805882ddd.tar.gz px4-nuttx-4dce3ece605863986f69cad49477441805882ddd.tar.bz2 px4-nuttx-4dce3ece605863986f69cad49477441805882ddd.zip |
8051 is getting closer. Still have to setup timer and uart.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@32 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/pjrc-8051/src/up_reprioritizertr.c')
-rw-r--r-- | nuttx/arch/pjrc-8051/src/up_reprioritizertr.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c b/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c index dbb9db3c4..39c1cf508 100644 --- a/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c +++ b/nuttx/arch/pjrc-8051/src/up_reprioritizertr.c @@ -136,28 +136,26 @@ void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority) /* 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 exception context into the TCB at the (old) head of the * g_readytorun Task list. if up_savecontext returns a non-zero * value, then this is really the previously running task restarting! |