summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/powerpc/new_exception_processing/c_isr.inl
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/score/cpu/powerpc/new_exception_processing/c_isr.inl')
-rw-r--r--c/src/exec/score/cpu/powerpc/new_exception_processing/c_isr.inl9
1 files changed, 9 insertions, 0 deletions
diff --git a/c/src/exec/score/cpu/powerpc/new_exception_processing/c_isr.inl b/c/src/exec/score/cpu/powerpc/new_exception_processing/c_isr.inl
new file mode 100644
index 0000000000..68f8116fe9
--- /dev/null
+++ b/c/src/exec/score/cpu/powerpc/new_exception_processing/c_isr.inl
@@ -0,0 +1,9 @@
+RTEMS_INLINE_ROUTINE 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;
+}