summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/lm32/irq.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-05 14:19:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-05 14:19:58 +0000
commitaf2b90de3fc9fe8a4a7c89f1c2f54f10b62ab6e0 (patch)
tree6aff077ceea935cebe0e12817b47598a6fd1239b /cpukit/score/cpu/lm32/irq.c
parentUpdate (diff)
downloadrtems-af2b90de3fc9fe8a4a7c89f1c2f54f10b62ab6e0.tar.bz2
2009-05-05 Michael Walle <michael@walle.cc>
* cpu_asm.S, irq.c, rtems/score/cpu.h: Add lm32 gdb stub support.
Diffstat (limited to 'cpukit/score/cpu/lm32/irq.c')
-rw-r--r--cpukit/score/cpu/lm32/irq.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/score/cpu/lm32/irq.c b/cpukit/score/cpu/lm32/irq.c
index 3eb723d3d8..6580405513 100644
--- a/cpukit/score/cpu/lm32/irq.c
+++ b/cpukit/score/cpu/lm32/irq.c
@@ -28,11 +28,14 @@
unsigned long *_old_stack_ptr;
#endif
+unsigned long *_exception_stack_frame;
+
register unsigned long *stack_ptr asm("sp");
void __ISR_Handler(uint32_t vector, CPU_Interrupt_frame *ifr)
{
register uint32_t level;
+ _exception_stack_frame = NULL;
/* Interrupts are disabled upon entry to this Handler */
@@ -77,7 +80,15 @@ void __ISR_Handler(uint32_t vector, CPU_Interrupt_frame *ifr)
if ( _Context_Switch_necessary || _ISR_Signals_to_thread_executing ) {
_ISR_Signals_to_thread_executing = FALSE;
+
+ /* save off our stack frame so the context switcher can get to it */
+ _exception_stack_frame = ifr;
+
_Thread_Dispatch();
+
+ /* and make sure its clear in case we didn't dispatch. if we did, its
+ * already cleared */
+ _exception_stack_frame = NULL;
}
}