diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-05-21 17:42:14 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-05-21 17:42:14 +0000 |
commit | f8277441342420351279c57d083cd1244a6c7e6f (patch) | |
tree | ef4366f92801266f27611fadee8a32112ad80f01 /nuttx/arch/arm/src/cortexm3/up_doirq.c | |
parent | 5c2ab2b81b0e0e851d73fb49cf21def02931e4b9 (diff) | |
download | px4-nuttx-f8277441342420351279c57d083cd1244a6c7e6f.tar.gz px4-nuttx-f8277441342420351279c57d083cd1244a6c7e6f.tar.bz2 px4-nuttx-f8277441342420351279c57d083cd1244a6c7e6f.zip |
Complete Rx side of ethernet driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1812 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/cortexm3/up_doirq.c')
-rw-r--r-- | nuttx/arch/arm/src/cortexm3/up_doirq.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/nuttx/arch/arm/src/cortexm3/up_doirq.c b/nuttx/arch/arm/src/cortexm3/up_doirq.c index 8c749ce5f..d6551153c 100644 --- a/nuttx/arch/arm/src/cortexm3/up_doirq.c +++ b/nuttx/arch/arm/src/cortexm3/up_doirq.c @@ -72,42 +72,43 @@ uint32 *up_doirq(int irq, uint32 *regs) #ifdef CONFIG_SUPPRESS_INTERRUPTS PANIC(OSERR_ERREXCEPTION); #else - if ((unsigned)irq < NR_IRQS) - { - /* Current regs non-zero indicates that we are processing - * an interrupt; current_regs is also used to manage - * interrupt level context switches. - */ + /* Nested interrupts are not supported in this implementation. If you want + * implemented nested interrupts, you would have to (1) change the way that + * current regs is handled and (2) the design associated with + * CONFIG_ARCH_INTERRUPTSTACK. + */ - current_regs = regs; + /* Current regs non-zero indicates that we are processing an interrupt; + * current_regs is also used to manage interrupt level context switches. + */ - /* Mask and acknowledge the interrupt */ + DEBUGASSERT(current_regs == NULL); + current_regs = regs; - up_maskack_irq(irq); + /* Mask and acknowledge the interrupt */ - /* Deliver the IRQ */ + up_maskack_irq(irq); - irq_dispatch(irq, regs); + /* Deliver the IRQ */ - /* If a context switch occurred while processing the interrupt - * then current_regs may have change value. If we return any value - * different from the input regs, then the lower level will know - * that a context switch occurred during interrupt processing. - */ + irq_dispatch(irq, regs); - regs = current_regs; + /* If a context switch occurred while processing the interrupt then + * current_regs may have change value. If we return any value different + * from the input regs, then the lower level will know that a context + * switch occurred during interrupt processing. + */ - /* Indicate that we are no long in an interrupt handler */ + regs = current_regs; - current_regs = NULL; + /* Indicate that we are no long in an interrupt handler */ - /* Unmask the last interrupt (global interrupts are still - * disabled. - */ + current_regs = NULL; - up_enable_irq(irq); - } - up_ledoff(LED_INIRQ); + /* Unmask the last interrupt (global interrupts are still disabled) */ + + up_enable_irq(irq); #endif + up_ledoff(LED_INIRQ); return regs; } |