summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/sparc/cpu.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-10 18:40:49 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-10 18:40:49 +0000
commita32835a34a8847b5ec36ccb4f458a21c90001cb7 (patch)
treea6bc120f01cc909810b807fe312f477aa3b50a43 /cpukit/score/cpu/sparc/cpu.c
parentBack off patch which should not have been committed. (diff)
downloadrtems-a32835a34a8847b5ec36ccb4f458a21c90001cb7.tar.bz2
2007-05-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1237/rtems * cpu.c, cpu_asm.S, rtems/score/cpu.h: Add logic to prevent stack creep when interrupts occur at a sufficient rate that the interrupted thread never gets to clean its stack. This patch ensures that an interrupted thread will not nest ISR dispatches on its stack.
Diffstat (limited to '')
-rw-r--r--cpukit/score/cpu/sparc/cpu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
index ed240fc8a8..5e6bf3717d 100644
--- a/cpukit/score/cpu/sparc/cpu.c
+++ b/cpukit/score/cpu/sparc/cpu.c
@@ -71,6 +71,13 @@ void _CPU_Initialize(
*/
_CPU_Table = *cpu_table;
+
+ /*
+ * Since no tasks have been created yet and no interrupts have occurred,
+ * there is no way that the currently executing thread can have an
+ * _ISR_Dispatch stack frame on its stack.
+ */
+ _CPU_ISR_Dispatch_disable = 0;
}
/*PAGE
@@ -327,4 +334,10 @@ void _CPU_Context_Initialize(
tmp_psr |= SPARC_PSR_EF_MASK;
#endif
the_context->psr = tmp_psr;
+
+ /*
+ * Since THIS thread is being created, there is no way that THIS
+ * thread can have an _ISR_Dispatch stack frame on its stack.
+ */
+ the_context->isr_dispatch_disable = 0;
}