summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/c4x/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/cpu/c4x/irq.c')
-rw-r--r--cpukit/score/cpu/c4x/irq.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/cpukit/score/cpu/c4x/irq.c b/cpukit/score/cpu/c4x/irq.c
index 055bae40c4..43d6c1471c 100644
--- a/cpukit/score/cpu/c4x/irq.c
+++ b/cpukit/score/cpu/c4x/irq.c
@@ -73,10 +73,17 @@ void __ISR_Handler(unsigned32 vector, void *isr_sp)
_Thread_Dispatch_disable_level--;
_CPU_ISR_Enable( level );
- if ( _Thread_Dispatch_disable_level == 0 ) {
- if ( _Context_Switch_necessary || !_ISR_Signals_to_thread_executing ) {
- _ISR_Signals_to_thread_executing = FALSE;
- _Thread_Dispatch();
- }
+
+ if ( _ISR_Nest_level )
+ return;
+
+ if ( _Thread_Dispatch_disable_level ) {
+ _ISR_Signals_to_thread_executing = FALSE;
+ return;
+ }
+
+ if ( _Context_Switch_necessary || _ISR_Signals_to_thread_executing ) {
+ _ISR_Signals_to_thread_executing = FALSE;
+ _Thread_Dispatch();
}
}