summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-09-22 10:01:44 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-09-22 10:01:44 -0500
commit90a2a6d6c6e08551afba160d6a5972a73695b105 (patch)
tree4d48e15c36e13feee1b4a9c367ebb909e3ea47e5
parentsparc/.../grcan.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTE (diff)
downloadrtems-90a2a6d6c6e08551afba160d6a5972a73695b105.tar.bz2
intrbody.c: Fix missing prototype warnings
-rw-r--r--cpukit/rtems/src/intrbody.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/cpukit/rtems/src/intrbody.c b/cpukit/rtems/src/intrbody.c
index 237a0a3a78..df7363a65a 100644
--- a/cpukit/rtems/src/intrbody.c
+++ b/cpukit/rtems/src/intrbody.c
@@ -6,7 +6,7 @@
*/
/*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2013.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -23,8 +23,26 @@
#include <rtems/score/isr.h>
#include <rtems/rtems/intr.h>
+/*
+ * Undefine all of these is normally a macro and we want a real body in
+ * the library for other language bindings.
+ */
#undef rtems_interrupt_disable
+#undef rtems_interrupt_enable
+#undef rtems_interrupt_flash
+#undef rtems_interrupt_is_in_progress
+
+/*
+ * Prototype them to avoid warnings
+ */
+rtems_interrupt_level rtems_interrupt_disable( void );
+void rtems_interrupt_enable( rtems_interrupt_level previous_level );
+void rtems_interrupt_flash( rtems_interrupt_level previous_level );
+bool rtems_interrupt_is_in_progress( void );
+/*
+ * Now define real bodies
+ */
rtems_interrupt_level rtems_interrupt_disable( void )
{
rtems_interrupt_level previous_level;
@@ -34,8 +52,6 @@ rtems_interrupt_level rtems_interrupt_disable( void )
return previous_level;
}
-#undef rtems_interrupt_enable
-
void rtems_interrupt_enable(
rtems_interrupt_level previous_level
)
@@ -43,8 +59,6 @@ void rtems_interrupt_enable(
_ISR_Enable( previous_level );
}
-#undef rtems_interrupt_flash
-
void rtems_interrupt_flash(
rtems_interrupt_level previous_level
)
@@ -52,8 +66,6 @@ void rtems_interrupt_flash(
_ISR_Flash( previous_level );
}
-#undef rtems_interrupt_is_in_progress
-
bool rtems_interrupt_is_in_progress( void )
{
return _ISR_Is_in_progress();