From 90a2a6d6c6e08551afba160d6a5972a73695b105 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 22 Sep 2013 10:01:44 -0500 Subject: intrbody.c: Fix missing prototype warnings --- cpukit/rtems/src/intrbody.c | 26 +++++++++++++++++++------- 1 file 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 #include +/* + * 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(); -- cgit v1.2.3