diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-08 16:27:21 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-11-08 16:27:21 +0000 |
commit | 48ca47d791830d3f34ab157e22a7823ae0373b54 (patch) | |
tree | aa3c6f72a9464cba98b2149a51e60094e24dfd08 /nuttx/arch/sh/src/common/up_doirq.c | |
parent | 94ad22d83ced0c372de9dc5d38317293c66d629c (diff) | |
download | px4-nuttx-48ca47d791830d3f34ab157e22a7823ae0373b54.tar.gz px4-nuttx-48ca47d791830d3f34ab157e22a7823ae0373b54.tar.bz2 px4-nuttx-48ca47d791830d3f34ab157e22a7823ae0373b54.zip |
Add interrupt stack
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1168 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/sh/src/common/up_doirq.c')
-rw-r--r-- | nuttx/arch/sh/src/common/up_doirq.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c index 01aa21500..2c3943b06 100644 --- a/nuttx/arch/sh/src/common/up_doirq.c +++ b/nuttx/arch/sh/src/common/up_doirq.c @@ -83,13 +83,21 @@ void up_doirq(int irq, uint32* regs) /* Mask and acknowledge the interrupt (if supported by the chip) */ +#ifndef CONFIG_ARCH_NOINTC up_maskack_irq(irq); +#endif /* Deliver the IRQ */ irq_dispatch(irq, regs); - /* Indicate that we are no long in an interrupt handler */ + /* Get the current value of regs... it may have changed because + * of a context switch performed during interrupt processing. + */ + + regs = current_regs; + + /* Indicate that we are no longer in an interrupt handler */ current_regs = NULL; @@ -97,8 +105,11 @@ void up_doirq(int irq, uint32* regs) * disabled. */ +#ifndef CONFIG_ARCH_NOINTC up_enable_irq(irq); +#endif } up_ledoff(LED_INIRQ); #endif + return regs; } |