summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/score/cpu/a29k/ChangeLog7
-rw-r--r--cpukit/score/cpu/a29k/cpu.c17
-rw-r--r--cpukit/score/cpu/no_cpu/ChangeLog7
-rw-r--r--cpukit/score/cpu/no_cpu/cpu_asm.c24
4 files changed, 39 insertions, 16 deletions
diff --git a/cpukit/score/cpu/a29k/ChangeLog b/cpukit/score/cpu/a29k/ChangeLog
index 508c40b0a6..8663872d8d 100644
--- a/cpukit/score/cpu/a29k/ChangeLog
+++ b/cpukit/score/cpu/a29k/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-11 Joel Sherrill <joel@OARcorp.com>
+
+ * cpu_asm.c: Rework logic that decides when to call
+ _Thread_Dispatch. Analysis by Sergei Organov <osv@javad.ru>
+ determined that _ISR_Signals_to_thread_executing was not being
+ honored and/or cleared properly.
+
2002-12-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Require autoconf-2.57 + automake-1.7.2.
diff --git a/cpukit/score/cpu/a29k/cpu.c b/cpukit/score/cpu/a29k/cpu.c
index 158f680d4e..d522c07538 100644
--- a/cpukit/score/cpu/a29k/cpu.c
+++ b/cpukit/score/cpu/a29k/cpu.c
@@ -270,8 +270,17 @@ void a29k_ISR_Handler(unsigned32 vector)
(*_ISR_Vector_table[ vector ])( vector );
--_Thread_Dispatch_disable_level;
--_ISR_Nest_level;
- if ( !_Thread_Dispatch_disable_level && !_ISR_Nest_level &&
- (_Context_Switch_necessary || _ISR_Signals_to_thread_executing ))
- _Thread_Dispatch();
- return;
+
+ 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();
+ }
}
diff --git a/cpukit/score/cpu/no_cpu/ChangeLog b/cpukit/score/cpu/no_cpu/ChangeLog
index 1924dd58d6..f9b51ccfb8 100644
--- a/cpukit/score/cpu/no_cpu/ChangeLog
+++ b/cpukit/score/cpu/no_cpu/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-11 Joel Sherrill <joel@OARcorp.com>
+
+ * cpu_asm.c: Rework logic that decides when to call
+ _Thread_Dispatch. Analysis by Sergei Organov <osv@javad.ru>
+ determined that _ISR_Signals_to_thread_executing was not being
+ honored and/or cleared properly.
+
2002-12-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Require autoconf-2.57 + automake-1.7.2.
diff --git a/cpukit/score/cpu/no_cpu/cpu_asm.c b/cpukit/score/cpu/no_cpu/cpu_asm.c
index 2ee4067f6c..f2f4eb499d 100644
--- a/cpukit/score/cpu/no_cpu/cpu_asm.c
+++ b/cpukit/score/cpu/no_cpu/cpu_asm.c
@@ -154,28 +154,28 @@ void _ISR_Handler()
*
* (*_ISR_Vector_table[ vector ])( vector );
*
+ * _Thread_Dispatch_disable_level--;
+ *
* --_ISR_Nest_level;
*
* if ( _ISR_Nest_level )
* goto the label "exit interrupt (simple case)"
*
- * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
- * restore stack
- * #endif
- *
- * if ( !_Context_Switch_necessary )
- * goto the label "exit interrupt (simple case)"
- *
- * if ( !_ISR_Signals_to_thread_executing )
+ * if ( _Thread_Dispatch_disable_level )
* _ISR_Signals_to_thread_executing = FALSE;
* goto the label "exit interrupt (simple case)"
*
- * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
- *
- * prepare to get out of interrupt
- * return from interrupt (maybe to _ISR_Dispatch)
+ * if ( _Context_Switch_necessary || _ISR_Signals_to_thread_executing ) {
+ * _ISR_Signals_to_thread_executing = FALSE;
+ * call _Thread_Dispatch() or prepare to return to _ISR_Dispatch
+ * prepare to get out of interrupt
+ * return from interrupt (maybe to _ISR_Dispatch)
*
* LABEL "exit interrupt (simple case):
+ * #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == TRUE )
+ * if outermost interrupt
+ * restore stack
+ * #endif
* prepare to get out of interrupt
* return from interrupt
*/