summaryrefslogtreecommitdiff
path: root/nuttx/arch/c5471/src/up_schedulesigaction.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-18 15:28:23 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-18 15:28:23 +0000
commitf43b9a694d227c9a261ed599190d5341c8e8b30c (patch)
tree42ad5748fc6801e7828c63a4fd803c4ad8473131 /nuttx/arch/c5471/src/up_schedulesigaction.c
parente3940eb2080711edac189cca3f642ee89dc215f2 (diff)
downloadpx4-nuttx-f43b9a694d227c9a261ed599190d5341c8e8b30c.tar.gz
px4-nuttx-f43b9a694d227c9a261ed599190d5341c8e8b30c.tar.bz2
px4-nuttx-f43b9a694d227c9a261ed599190d5341c8e8b30c.zip
Fix problems in state restore logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/c5471/src/up_schedulesigaction.c')
-rw-r--r--nuttx/arch/c5471/src/up_schedulesigaction.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/arch/c5471/src/up_schedulesigaction.c b/nuttx/arch/c5471/src/up_schedulesigaction.c
index 7fa92e49f..4ea39bec2 100644
--- a/nuttx/arch/c5471/src/up_schedulesigaction.c
+++ b/nuttx/arch/c5471/src/up_schedulesigaction.c
@@ -138,15 +138,15 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
*/
tcb->xcp.sigdeliver = sigdeliver;
- tcb->xcp.saved_lr = current_regs[JB_LR];
- tcb->xcp.saved_cpsr = current_regs[JB_CPSR];
+ tcb->xcp.saved_pc = current_regs[REG_PC];
+ tcb->xcp.saved_cpsr = current_regs[REG_CPSR];
/* Then set up to vector to the trampoline with interrupts
* disabled
*/
- current_regs[JB_LR] = (uint32)up_sigdeliver;
- current_regs[JB_CPSR] = SVC_MODE | I_BIT | F_BIT;
+ current_regs[REG_PC] = (uint32)up_sigdeliver;
+ current_regs[REG_CPSR] = SVC_MODE | I_BIT | F_BIT;
/* And make sure that the saved context in the TCB
* is the same as the interrupt return context.
@@ -170,15 +170,15 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
*/
tcb->xcp.sigdeliver = sigdeliver;
- tcb->xcp.saved_lr = tcb->xcp.regs[JB_LR];
- tcb->xcp.saved_cpsr = tcb->xcp.regs[JB_CPSR];
+ tcb->xcp.saved_pc = tcb->xcp.regs[REG_PC];
+ tcb->xcp.saved_cpsr = tcb->xcp.regs[REG_CPSR];
/* Then set up to vector to the trampoline with interrupts
* disabled
*/
- tcb->xcp.regs[JB_LR] = (uint32)up_sigdeliver;
- tcb->xcp.regs[JB_CPSR] = SVC_MODE | I_BIT | F_BIT;
+ tcb->xcp.regs[REG_PC] = (uint32)up_sigdeliver;
+ tcb->xcp.regs[REG_CPSR] = SVC_MODE | I_BIT | F_BIT;
}
irqrestore(flags);