[rtems commit] intrbody.c: Fix missing prototype warnings

Joel Sherrill joel at rtems.org
Sun Sep 22 15:32:20 UTC 2013


Module:    rtems
Branch:    master
Commit:    90a2a6d6c6e08551afba160d6a5972a73695b105
Changeset: http://git.rtems.org/rtems/commit/?id=90a2a6d6c6e08551afba160d6a5972a73695b105

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Sun Sep 22 10:01:44 2013 -0500

intrbody.c: Fix missing prototype warnings

---

 cpukit/rtems/src/intrbody.c |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/cpukit/rtems/src/intrbody.c b/cpukit/rtems/src/intrbody.c
index 237a0a3..df7363a 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();




More information about the vc mailing list