summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c')
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c
index 38a962e967..10d38fab1a 100644
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c
+++ b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c
@@ -110,6 +110,19 @@ void _CPU_Install_interrupt_stack( void )
{
}
+/*PAGE
+ *
+ * This is the PowerPC specific implementation of the routine which
+ * returns TRUE if an interrupt is in progress.
+ */
-
+boolean _ISR_Is_in_progress( void )
+{
+ register unsigned int isr_nesting_level;
+ /*
+ * Move from special purpose register 0 (mfspr SPRG0, r3)
+ */
+ asm volatile ("mfspr %0, 272" : "=r" (isr_nesting_level));
+ return isr_nesting_level;
+}