summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 15:23:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-12 15:23:44 +0000
commitf93630db63c411300bd638e7406c45ca06431741 (patch)
tree2681b1d89dd36b582125d481a593261d663efc0b /c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c
parent2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-f93630db63c411300bd638e7406c45ca06431741.tar.bz2
2007-09-12 Joel Sherrill <joel.sherrill@OARcorp.com>
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.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/irq/ictrl.c14
1 files changed, 8 insertions, 6 deletions
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);
}
/*