From 4b83378280f10b01f943c4422e79222d59d27e94 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 11 Feb 2003 23:43:11 +0000 Subject: 2003-02-11 Joel Sherrill * irq.c: Rework logic that decides when to call _Thread_Dispatch. Analysis by Sergei Organov determined that _ISR_Signals_to_thread_executing was not being honored and/or cleared properly. --- cpukit/score/cpu/c4x/ChangeLog | 7 +++++++ cpukit/score/cpu/c4x/irq.c | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/cpukit/score/cpu/c4x/ChangeLog b/cpukit/score/cpu/c4x/ChangeLog index 0a3b7d947a..1c88481777 100644 --- a/cpukit/score/cpu/c4x/ChangeLog +++ b/cpukit/score/cpu/c4x/ChangeLog @@ -1,3 +1,10 @@ +2003-02-11 Joel Sherrill + + * irq.c: Rework logic that decides when to call + _Thread_Dispatch. Analysis by Sergei Organov + determined that _ISR_Signals_to_thread_executing was not being + honored and/or cleared properly. + 2002-12-11 Ralf Corsepius * configure.ac: Require autoconf-2.57 + automake-1.7.2. 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(); } } -- cgit v1.2.3