summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2008-07-16 21:47:04 +0000
committerTill Straumann <strauman@slac.stanford.edu>2008-07-16 21:47:04 +0000
commit441c930dc12f4e5cf4d65be91fdedcdaf8989b9d (patch)
tree99b275e6e89934462cbde7ecd7add2e64971e4d5 /cpukit/score/cpu/powerpc
parent2008-07-16 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-441c930dc12f4e5cf4d65be91fdedcdaf8989b9d.tar.bz2
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* score/cpu/powerpc/rtems/powerpc/registers.h: added ppc_interrupt_get_disable_mask() inline function.
Diffstat (limited to 'cpukit/score/cpu/powerpc')
-rw-r--r--cpukit/score/cpu/powerpc/rtems/powerpc/registers.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h b/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h
index 312dbcc75a..61fca2efbe 100644
--- a/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h
+++ b/cpukit/score/cpu/powerpc/rtems/powerpc/registers.h
@@ -345,6 +345,16 @@ static inline void ppc_interrupt_set_disable_mask( uint32_t mask)
);
}
+static inline uint32_t ppc_interrupt_get_disable_mask()
+{
+uint32_t mask;
+ asm volatile (
+ "mfspr %0,272"
+ : "=r" (mask)
+ );
+ return mask;
+}
+
static inline uint32_t ppc_interrupt_disable()
{
uint32_t level;