From f93630db63c411300bd638e7406c45ca06431741 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 12 Sep 2007 15:23:44 +0000 Subject: 2007-09-12 Joel Sherrill PR 1257/bsps * mpc5xx/exceptions/raw_exception.c, mpc5xx/irq/irq.c, mpc6xx/exceptions/raw_exception.c, mpc8260/exceptions/raw_exception.c, mpc8xx/exceptions/raw_exception.c, new-exceptions/raw_exception.c, ppc403/ictrl/ictrl.c, ppc403/irq/ictrl.c: Code outside of cpukit should use the public API for rtems_interrupt_disable/rtems_interrupt_enable. By bypassing the public API and directly accessing _CPU_ISR_Disable and _CPU_ISR_Enable, they were bypassing the compiler memory barrier directive which could lead to problems. This patch also changes the type of the variable passed into these routines and addresses minor style issues. --- c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c') diff --git a/c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c b/c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c index 6a1f810cd0..dc51da6bd6 100644 --- a/c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c +++ b/c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c @@ -128,10 +128,11 @@ set_exier(uint32_t val) RTEMS_INLINE_ROUTINE void enable_ext_irq( uint32_t mask) { - uint32_t isrlvl; - _CPU_ISR_Disable(isrlvl); + rtems_interrupt_level level; + + rtems_interrupt_disable(level); set_exier(get_exier() | ((mask)&PPC_EXI_MASK)); - _CPU_ISR_Enable(isrlvl); + rtems_interrupt_enable(level); } /* @@ -140,10 +141,11 @@ enable_ext_irq( uint32_t mask) RTEMS_INLINE_ROUTINE void disable_ext_irq( uint32_t mask) { - uint32_t isrlvl; - _CPU_ISR_Disable(isrlvl); + rtems_interrupt_level level; + + rtems_interrupt_disable(level); set_exier(get_exier() & ~(mask) & PPC_EXI_MASK); - _CPU_ISR_Enable(isrlvl); + rtems_interrupt_enable(level); } /* -- cgit v1.2.3