From 441c930dc12f4e5cf4d65be91fdedcdaf8989b9d Mon Sep 17 00:00:00 2001 From: Till Straumann Date: Wed, 16 Jul 2008 21:47:04 +0000 Subject: [PATCH] 2008-07-16 Till Straumann * score/cpu/powerpc/rtems/powerpc/registers.h: added ppc_interrupt_get_disable_mask() inline function. --- cpukit/ChangeLog | 5 +++++ cpukit/score/cpu/powerpc/rtems/powerpc/registers.h | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 1037b501f3..0f9d243c01 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2008-07-16 Till Straumann + + * score/cpu/powerpc/rtems/powerpc/registers.h: + added ppc_interrupt_get_disable_mask() inline function. + 2008-07-16 Joel Sherrill * libmisc/shell/shellconfig.h, libmisc/stackchk/stackchk.h: Fix typos. 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;