Index: c/src/lib/libbsp/powerpc/ep1a/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/ep1a/ChangeLog	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/ep1a/ChangeLog	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* irq/irq.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.
+
 2007-08-01	Joel Sherrill <joel.sherrill@oarcorp.com>
 
Index: c/src/lib/libbsp/powerpc/ep1a/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/ep1a/irq/irq.c	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/ep1a/irq/irq.c	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -101,5 +101,5 @@
 int BSP_install_rtems_shared_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level   level;
     rtems_irq_connect_data* vchain;
 
@@ -110,8 +110,8 @@
     printk("Install Shared interrupt %d\n", irq->name);
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
 
     if ( (int)rtems_hdl_tbl[irq->name].next_handler  == -1 ) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected to an unshared handler\n",irq->name);
       return 0;
@@ -157,5 +157,5 @@
     irq->on(irq);
     
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -169,5 +169,5 @@
 int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level       level;
 
     if (!isValidInterrupt(irq->name)) {
@@ -182,7 +182,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected\n",irq->name);
       return 0;
@@ -219,5 +219,5 @@
     irq->on(irq);
     
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -227,19 +227,19 @@
 int BSP_get_current_rtems_irq_handler	(rtems_irq_connect_data* irq)
 {
-     unsigned int level;
-
-     if (!isValidInterrupt(irq->name)) {
-      return 0;
-     }
-     _CPU_ISR_Disable(level);
-     *irq = rtems_hdl_tbl[irq->name];
-     _CPU_ISR_Enable(level);
-     return 1;
+    rtems_interrupt_level       level;
+
+    if (!isValidInterrupt(irq->name)) {
+      return 0;
+    }
+    rtems_interrupt_disable(level);
+      *irq = rtems_hdl_tbl[irq->name];
+    rtems_interrupt_enable(level);
+    return 1;
 }
 
 int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-   rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
-    unsigned int level;
+    rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
+    rtems_interrupt_level   level;
   
     if (!isValidInterrupt(irq->name)) {
@@ -253,7 +253,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       return 0;
     }
@@ -275,5 +275,5 @@
        if( !found )
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
           return 0;
        }
@@ -283,5 +283,5 @@
        if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) 
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
          return 0;
        }
@@ -336,5 +336,5 @@
     }
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -347,9 +347,10 @@
 int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
 {
-    int i;
-    unsigned int level;
-   /*
-    * Store various code accelerators
-    */
+    int                    i;
+    rtems_interrupt_level  level;
+
+    /*
+     * Store various code accelerators
+     */
     internal_config 		= config;
     default_rtems_entry 	= config->defaultEntry;
@@ -357,5 +358,5 @@
     return 1;  
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     /*
      * set up internal tables used by rtems interrupt prologue
@@ -429,5 +430,5 @@
       }
     }
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
     return 1;
 }
Index: c/src/lib/libbsp/powerpc/gen5200/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/ChangeLog	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/gen5200/ChangeLog	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* irq/irq.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.
+
 2007-09-05	Joel Sherrill <joel.sherrill@oarcorp.com>
 
Index: c/src/lib/libbsp/powerpc/gen5200/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/irq/irq.c	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/gen5200/irq/irq.c	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -491,5 +491,5 @@
 int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
   {
-  unsigned int level;
+  rtems_interrupt_level level;
 
   if(!isValidInterrupt(irq->name))
@@ -514,5 +514,5 @@
     }
 
-  _CPU_ISR_Disable(level);
+  rtems_interrupt_disable(level);
 
   /*
@@ -559,5 +559,5 @@
   irq->on(irq);
 
-  _CPU_ISR_Enable(level);
+  rtems_interrupt_enable(level);
 
   return 1;
@@ -590,5 +590,5 @@
 int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
   {
-  unsigned int level;
+  rtems_interrupt_level level;
 
   if(!isValidInterrupt(irq->name))
@@ -611,5 +611,5 @@
     }
 
-  _CPU_ISR_Disable(level);
+  rtems_interrupt_disable(level);
 
   if(is_siu_irq(irq->name))
@@ -640,5 +640,5 @@
   rtems_hdl_tbl[irq->name] = default_rtems_entry;
 
-  _CPU_ISR_Enable(level);
+  rtems_interrupt_enable(level);
 
   return 1;
@@ -656,15 +656,15 @@
 int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
   {
-  int i;
-  unsigned int level;
+  int                   i;
+  rtems_interrupt_level level;
 
  /*
   * Store various code accelerators
   */
-  internal_config 		= config;
+  internal_config 	= config;
   default_rtems_entry 	= config->defaultEntry;
-  rtems_hdl_tbl 		= config->irqHdlTbl;
-
-  _CPU_ISR_Disable(level);
+  rtems_hdl_tbl 	= config->irqHdlTbl;
+
+  rtems_interrupt_disable(level);
 
   /*
@@ -712,5 +712,5 @@
     }
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
     return 1;
 
Index: c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* irq/irq.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.
+
 2007-07-12	Joel Sherrill <joel.sherrill@OARcorp.com>
 
Index: c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -198,5 +198,5 @@
 int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level       level;
 
     if (!isValidInterrupt(irq->name)) {
@@ -214,5 +214,5 @@
     }
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
 
     /*
@@ -246,5 +246,5 @@
     irq->on(irq);
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -262,5 +262,5 @@
 int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level       level;
 
     if (!isValidInterrupt(irq->name)) {
@@ -277,5 +277,5 @@
       return 0;
     }
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
 
     if (is_cpm_irq(irq->name)) {
@@ -307,5 +307,5 @@
     rtems_hdl_tbl[irq->name] = default_rtems_entry;
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -318,14 +318,15 @@
 int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
 {
-    int i;
-    unsigned int level;
-   /*
-    * Store various code accelerators
-    */
+    int                    i;
+    rtems_interrupt_level  level;
+
+    /*
+     * Store various code accelerators
+     */
     internal_config 		= config;
     default_rtems_entry 	= config->defaultEntry;
     rtems_hdl_tbl 		= config->irqHdlTbl;
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     /*
      * start with CPM IRQ
@@ -377,5 +378,5 @@
       }
     }
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
     return 1;
 }
Index: c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* irq/irq.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.
+
 2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
Index: c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -246,5 +246,5 @@
 int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-	unsigned int level;
+	rtems_interrupt_level level;
 
 	if (!isValidInterrupt(irq->name)) {
@@ -264,5 +264,5 @@
 	}
 
-	_CPU_ISR_Disable(level);
+	rtems_interrupt_disable(level);
 
 	/*
@@ -292,5 +292,5 @@
 	irq->on(irq);
 
-	_CPU_ISR_Enable(level);
+	rtems_interrupt_enable(level);
 
 	/*
@@ -311,5 +311,5 @@
 int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-	unsigned int level;
+	rtems_interrupt_level level;
 
 	if (!isValidInterrupt(irq->name)) {
@@ -326,5 +326,5 @@
 	  return 0;
 	}
-	_CPU_ISR_Disable(level);
+	rtems_interrupt_disable(level);
 
 	if (is_cpm_irq(irq->name)) {
@@ -351,5 +351,5 @@
 	rtems_hdl_tbl[irq->name] = default_rtems_entry;
 
-	_CPU_ISR_Enable(level);
+	rtems_interrupt_enable(level);
 
 	return 1;
@@ -362,6 +362,7 @@
 int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
 {
-	int i;
-	unsigned int level;
+	int                   i;
+	rtems_interrupt_level level;
+
 	/*
 	 * Store various code accelerators
@@ -374,5 +375,5 @@
 	compute_SIU_IvectMask_from_prio();
 
-	_CPU_ISR_Disable(level);
+	rtems_interrupt_disable(level);
 	/*
 	 * start with CPM IRQ
@@ -399,5 +400,5 @@
 	}
 
-	_CPU_ISR_Enable(level);
+	rtems_interrupt_enable(level);
 	return 1;
 }
Index: c/src/lib/libbsp/powerpc/psim/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/psim/ChangeLog	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/psim/ChangeLog	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* irq/irq.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.
+
 2007-07-06	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
Index: c/src/lib/libbsp/powerpc/psim/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/psim/irq/irq.c	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/psim/irq/irq.c	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -115,5 +115,5 @@
 int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level       level;
   
     if (!isValidInterrupt(irq->name)) {
@@ -128,7 +128,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected\n",irq->name);
       return 0;
@@ -155,5 +155,5 @@
     irq->on(irq);
     
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -163,19 +163,19 @@
 int BSP_get_current_rtems_irq_handler	(rtems_irq_connect_data* irq)
 {
-     unsigned int level;
-
-     if (!isValidInterrupt(irq->name)) {
-      return 0;
-     }
-     _CPU_ISR_Disable(level);
-     *irq = rtems_hdl_tbl[irq->name];
-     _CPU_ISR_Enable(level);
-     return 1;
+    rtems_interrupt_level       level;
+
+    if (!isValidInterrupt(irq->name)) {
+      return 0;
+    }
+    rtems_interrupt_disable(level);
+      *irq = rtems_hdl_tbl[irq->name];
+    rtems_interrupt_enable(level);
+    return 1;
 }
 
 int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-   rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
-    unsigned int level;
+    rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
+    rtems_interrupt_level   level;
   
     if (!isValidInterrupt(irq->name)) {
@@ -189,7 +189,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       return 0;
     }
@@ -211,5 +211,5 @@
        if( !found )
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
           return 0;
        }
@@ -219,5 +219,5 @@
        if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) 
        {
-          _CPU_ISR_Enable(level);
+         rtems_interrupt_enable(level);
          return 0;
        }
@@ -263,5 +263,5 @@
     }
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
Index: c/src/lib/libbsp/powerpc/score603e/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/score603e/ChangeLog	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/score603e/ChangeLog	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -1,2 +1,13 @@
+2007-09-12	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	PR 1257/bsps
+	* irq/irq.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.
+
 2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
Index: c/src/lib/libbsp/powerpc/score603e/irq/irq.c
===================================================================
--- c/src/lib/libbsp/powerpc/score603e/irq/irq.c	(revision dc7271fa9e9a14be48c61242fc1dd83c9d449b25)
+++ c/src/lib/libbsp/powerpc/score603e/irq/irq.c	(revision ec1d0b9ddb0315d91d42edfa92aa4d79b0770dc4)
@@ -87,5 +87,5 @@
 int BSP_install_rtems_shared_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level   level;
     rtems_irq_connect_data* vchain;
 
@@ -95,8 +95,8 @@
     }
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
 
     if ( (int)rtems_hdl_tbl[irq->name].next_handler  == -1 ) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected to an unshared handler\n",irq->name);
       return 0;
@@ -132,5 +132,5 @@
     irq->on(irq);
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -143,5 +143,5 @@
 int BSP_install_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-    unsigned int level;
+    rtems_interrupt_level       level;
 
     if (!isValidInterrupt(irq->name)) {
@@ -156,7 +156,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       printk("IRQ vector %d already connected\n",irq->name);
       return 0;
@@ -186,5 +186,5 @@
     irq->on(irq);
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -193,19 +193,19 @@
 int BSP_get_current_rtems_irq_handler	(rtems_irq_connect_data* irq)
 {
-     unsigned int level;
-
-     if (!isValidInterrupt(irq->name)) {
-      return 0;
-     }
-     _CPU_ISR_Disable(level);
-     *irq = rtems_hdl_tbl[irq->name];
-     _CPU_ISR_Enable(level);
-     return 1;
+    rtems_interrupt_level       level;
+
+    if (!isValidInterrupt(irq->name)) {
+      return 0;
+    }
+    rtems_interrupt_disable(level);
+      *irq = rtems_hdl_tbl[irq->name];
+    rtems_interrupt_enable(level);
+    return 1;
 }
 
 int BSP_remove_rtems_irq_handler  (const rtems_irq_connect_data* irq)
 {
-   rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
-    unsigned int level;
+    rtems_irq_connect_data *pchain= NULL, *vchain = NULL;
+    rtems_interrupt_level       level;
 
     if (!isValidInterrupt(irq->name)) {
@@ -219,7 +219,7 @@
      * to get the previous handler before accepting to disconnect.
      */
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) {
-      _CPU_ISR_Enable(level);
+      rtems_interrupt_enable(level);
       return 0;
     }
@@ -241,5 +241,5 @@
        if( !found )
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
           return 0;
        }
@@ -249,5 +249,5 @@
        if (rtems_hdl_tbl[irq->name].hdl != irq->hdl)
        {
-          _CPU_ISR_Enable(level);
+          rtems_interrupt_enable(level);
          return 0;
        }
@@ -296,5 +296,5 @@
     }
 
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
 
     return 1;
@@ -307,14 +307,15 @@
 int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config)
 {
-    int i;
-    unsigned int level;
-   /*
-    * Store various code accelerators
-    */
+    int                    i;
+    rtems_interrupt_level  level;
+
+    /*
+     * Store various code accelerators
+     */
     internal_config 		= config;
     default_rtems_entry 	= config->defaultEntry;
     rtems_hdl_tbl 		= config->irqHdlTbl;
 
-    _CPU_ISR_Disable(level);
+    rtems_interrupt_disable(level);
     /*
      * set up internal tables used by rtems interrupt prologue
@@ -379,5 +380,5 @@
       }
     }
-    _CPU_ISR_Enable(level);
+    rtems_interrupt_enable(level);
     return 1;
 }
