summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/common/up_sigdeliver.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-13 16:19:05 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-13 16:19:05 +0000
commitd85a6b5e74dbbf82ef5ed1518d9c588356a11251 (patch)
treedea1afe1fb2cb6db6e1f6aaf63c72fe52a1a62f5 /nuttx/arch/arm/src/common/up_sigdeliver.c
parent27bee603a196dd9049de194777cc3be0d7514075 (diff)
downloadpx4-nuttx-d85a6b5e74dbbf82ef5ed1518d9c588356a11251.tar.gz
px4-nuttx-d85a6b5e74dbbf82ef5ed1518d9c588356a11251.tar.bz2
px4-nuttx-d85a6b5e74dbbf82ef5ed1518d9c588356a11251.zip
1st cut at lm3s6918 interrupt handling
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1776 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/common/up_sigdeliver.c')
-rw-r--r--nuttx/arch/arm/src/common/up_sigdeliver.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/common/up_sigdeliver.c b/nuttx/arch/arm/src/common/up_sigdeliver.c
index 16227ae21..bf5661696 100644
--- a/nuttx/arch/arm/src/common/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/common/up_sigdeliver.c
@@ -102,9 +102,13 @@ void up_sigdeliver(void)
/* Save the real return state on the stack. */
up_copystate(regs, rtcb->xcp.regs);
- regs[REG_PC] = rtcb->xcp.saved_pc;
- regs[REG_CPSR] = rtcb->xcp.saved_cpsr;
-
+ regs[REG_PC] = rtcb->xcp.saved_pc;
+#ifdef __thumb2__
+ regs[REG_PRIMASK] = rtcb->xcp.saved_primask;
+ regs[REG_XPSR] = rtcb->xcp.saved_xpsr;
+#else
+ regs[REG_CPSR] = rtcb->xcp.saved_cpsr;
+#endif
/* Get a local copy of the sigdeliver function pointer.
* we do this so that we can nullify the sigdeliver
* function point in the TCB and accept more signal
@@ -117,7 +121,11 @@ void up_sigdeliver(void)
/* Then restore the task interrupt statat. */
+#ifdef __thumb2__
+ irqrestore((uint16)regs[REG_PRIMASK]);
+#else
irqrestore(regs[REG_CPSR]);
+#endif
/* Deliver the signals */