[rtems commit] rtems: Improve RTEMS_NO_RETURN attribute

Sebastian Huber sebh at rtems.org
Sat Oct 10 12:01:32 UTC 2020


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Oct  6 07:39:44 2020 +0200

rtems: Improve RTEMS_NO_RETURN attribute

Provide RTEMS_NO_RETURN also in case RTEMS_DEBUG is defined to prevent errors
like this:

error: no return statement in function returning non-void [-Werror=return-type]

Use C11 and C++11 standard means to declare a no-return function.

Close #4122.

---

 bsps/include/bsp/bootcard.h                        | 2 +-
 bsps/powerpc/qoriq/include/bsp.h                   | 6 +++---
 bsps/sparc/leon3/include/leon.h                    | 2 +-
 cpukit/include/rtems/fatal.h                       | 6 ++----
 cpukit/include/rtems/init.h                        | 7 ++-----
 cpukit/include/rtems/rtems/tasks.h                 | 2 +-
 cpukit/include/rtems/score/assert.h                | 3 ---
 cpukit/include/rtems/score/basedefs.h              | 8 +++++---
 cpukit/include/rtems/score/interr.h                | 6 +++---
 cpukit/include/rtems/score/smpimpl.h               | 4 ++--
 cpukit/include/rtems/score/threadimpl.h            | 6 +++---
 cpukit/include/rtems/test-info.h                   | 2 +-
 cpukit/score/cpu/aarch64/include/rtems/score/cpu.h | 3 +--
 cpukit/score/cpu/arm/include/rtems/score/cpu.h     | 6 ++----
 cpukit/score/cpu/bfin/include/rtems/score/cpu.h    | 4 +---
 cpukit/score/cpu/i386/include/rtems/score/cpu.h    | 7 ++-----
 cpukit/score/cpu/lm32/include/rtems/score/cpu.h    | 4 +---
 cpukit/score/cpu/m68k/include/rtems/score/cpu.h    | 4 ++--
 cpukit/score/cpu/mips/include/rtems/score/cpu.h    | 4 +---
 cpukit/score/cpu/moxie/include/rtems/score/cpu.h   | 4 +---
 cpukit/score/cpu/nios2/include/rtems/score/cpu.h   | 7 ++-----
 cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h  | 4 +---
 cpukit/score/cpu/or1k/include/rtems/score/cpu.h    | 4 +---
 cpukit/score/cpu/powerpc/include/rtems/score/cpu.h | 4 +---
 cpukit/score/cpu/riscv/include/rtems/score/cpu.h   | 6 ++----
 cpukit/score/cpu/sh/include/rtems/score/cpu.h      | 4 +---
 cpukit/score/cpu/sparc/include/rtems/score/cpu.h   | 7 ++-----
 cpukit/score/cpu/sparc/include/rtems/score/sparc.h | 6 ++++--
 cpukit/score/cpu/sparc64/include/rtems/score/cpu.h | 4 +---
 cpukit/score/cpu/v850/include/rtems/score/cpu.h    | 4 +---
 cpukit/score/cpu/x86_64/include/rtems/score/cpu.h  | 4 +---
 31 files changed, 52 insertions(+), 92 deletions(-)

diff --git a/bsps/include/bsp/bootcard.h b/bsps/include/bsp/bootcard.h
index e3eed8d..0277dd8 100644
--- a/bsps/include/bsp/bootcard.h
+++ b/bsps/include/bsp/bootcard.h
@@ -68,7 +68,7 @@ void bsp_reset(void);
  * This style of initialization ensures that the C++ global constructors are
  * executed after RTEMS is initialized.
  */
-void boot_card(const char *cmdline) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void boot_card(const char *cmdline);
 
 struct Per_CPU_Control;
 
diff --git a/bsps/powerpc/qoriq/include/bsp.h b/bsps/powerpc/qoriq/include/bsp.h
index 1f5ca7f..75bf15c 100644
--- a/bsps/powerpc/qoriq/include/bsp.h
+++ b/bsps/powerpc/qoriq/include/bsp.h
@@ -88,7 +88,7 @@ int qoriq_if_intercom_attach_detach(
   );
 #endif
 
-void bsp_restart(void *addr) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void bsp_restart(void *addr);
 
 void *bsp_idle_thread( uintptr_t ignored );
 #define BSP_IDLE_TASK_BODY bsp_idle_thread
@@ -119,9 +119,9 @@ struct Per_CPU_Control;
 
 void qoriq_start_thread(struct Per_CPU_Control *);
 
-void qoriq_restart_secondary_processor(
+RTEMS_NO_RETURN void qoriq_restart_secondary_processor(
   const qoriq_start_spin_table *spin_table
-) RTEMS_NO_RETURN;
+);
 
 void qoriq_initialize_exceptions(void *interrupt_stack_begin);
 
diff --git a/bsps/sparc/leon3/include/leon.h b/bsps/sparc/leon3/include/leon.h
index d25825c..f70fae5 100644
--- a/bsps/sparc/leon3/include/leon.h
+++ b/bsps/sparc/leon3/include/leon.h
@@ -396,7 +396,7 @@ extern unsigned int leon3_timer_prescaler;
 /* GRLIB extended IRQ controller register */
 void leon3_ext_irq_init(void);
 
-void leon3_power_down_loop(void) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void leon3_power_down_loop(void);
 
 static inline uint32_t leon3_get_cpu_count(
   volatile struct irqmp_regs *irqmp
diff --git a/cpukit/include/rtems/fatal.h b/cpukit/include/rtems/fatal.h
index 3fc6a89..228e746 100644
--- a/cpukit/include/rtems/fatal.h
+++ b/cpukit/include/rtems/fatal.h
@@ -16,7 +16,7 @@
 #ifndef _RTEMS_FATAL_H
 #define _RTEMS_FATAL_H
 
-#include <rtems/score/basedefs.h> /* RTEMS_NO_RETURN */
+#include <rtems/score/basedefs.h>
 #include <rtems/extension.h>
 
 #ifdef __cplusplus
@@ -68,9 +68,7 @@ static inline void rtems_exception_frame_print(
  *
  * @see _Terminate().
  */
-void rtems_fatal_error_occurred(
-  uint32_t   the_error
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t the_error );
 
 /**
  * @brief Terminates the system.
diff --git a/cpukit/include/rtems/init.h b/cpukit/include/rtems/init.h
index 86b1408..552017f 100644
--- a/cpukit/include/rtems/init.h
+++ b/cpukit/include/rtems/init.h
@@ -46,8 +46,7 @@ extern "C" {
  *
  * This directive does not return.
  */
-void rtems_initialize_executive(void)
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void rtems_initialize_executive( void );
 
 /**
  * @brief Shutdown the RTEMS environment.
@@ -57,9 +56,7 @@ void rtems_initialize_executive(void)
  * shutdown and multitasking halted.  The system is terminated with a fatal
  * source of RTEMS_FATAL_SOURCE_EXIT and the specified result code.
  */
-void rtems_shutdown_executive(
-  uint32_t   result
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void rtems_shutdown_executive( uint32_t result );
 
 #ifdef __cplusplus
 }
diff --git a/cpukit/include/rtems/rtems/tasks.h b/cpukit/include/rtems/rtems/tasks.h
index f685c31..4e2e38d 100644
--- a/cpukit/include/rtems/rtems/tasks.h
+++ b/cpukit/include/rtems/rtems/tasks.h
@@ -430,7 +430,7 @@ rtems_status_code rtems_task_delete(
   rtems_id   id
 );
 
-void rtems_task_exit( void ) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void rtems_task_exit( void );
 
 /**
  * @brief RTEMS Task Mode
diff --git a/cpukit/include/rtems/score/assert.h b/cpukit/include/rtems/score/assert.h
index 6c68d9d..649d59b 100644
--- a/cpukit/include/rtems/score/assert.h
+++ b/cpukit/include/rtems/score/assert.h
@@ -78,9 +78,6 @@ extern "C" {
   #if !defined( RTEMS_SCHEDSIM )
     /* normal build is newlib. */
 
-    void __assert_func(const char *, int, const char *, const char *)
-      RTEMS_NO_RETURN;
-
     #define _Assert( _e ) \
        ( ( _e ) ? \
          ( void ) 0 : \
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h
index c31b4eb..0244af1 100644
--- a/cpukit/include/rtems/score/basedefs.h
+++ b/cpukit/include/rtems/score/basedefs.h
@@ -94,9 +94,11 @@
  *  can impact the code generated following calls to
  *  rtems_fatal_error_occurred and _Terminate.
  */
-#if defined(RTEMS_SCHEDSIM)
-  #define RTEMS_NO_RETURN
-#elif defined(__GNUC__) && !defined(RTEMS_DEBUG)
+#if __cplusplus >= 201103L
+  #define RTEMS_NO_RETURN [[noreturn]]
+#elif __STDC_VERSION__ >= 201112L
+  #define RTEMS_NO_RETURN _Noreturn
+#elif defined(__GNUC__)
   #define RTEMS_NO_RETURN __attribute__((__noreturn__))
 #else
   #define RTEMS_NO_RETURN
diff --git a/cpukit/include/rtems/score/interr.h b/cpukit/include/rtems/score/interr.h
index 1371e55..85767d0 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -261,10 +261,10 @@ extern Internal_errors_Information _Internal_errors_What_happened;
  *
  * @see rtems_fatal() and _Internal_error().
  */
-void _Terminate(
+RTEMS_NO_RETURN void _Terminate(
   Internal_errors_Source  the_source,
   Internal_errors_t       the_error
-) RTEMS_NO_RETURN;
+);
 
 /**
  * @brief Terminates the system with an INTERNAL_ERROR_CORE fatal source and
@@ -274,7 +274,7 @@ void _Terminate(
  *
  * @see _Terminate().
  */
-void _Internal_error( Internal_errors_Core_list core_error ) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _Internal_error( Internal_errors_Core_list core_error );
 
 #ifdef __cplusplus
 }
diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index dbca09d..1ba16fb 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -124,9 +124,9 @@ extern Processor_mask _SMP_Online_processors;
  *
  * @param cpu_self The current processor control.
  */
-void _SMP_Start_multitasking_on_secondary_processor(
+RTEMS_NO_RETURN void _SMP_Start_multitasking_on_secondary_processor(
   Per_CPU_Control *cpu_self
-) RTEMS_NO_RETURN;
+);
 
 /**
  * @brief Interrupts handler for inter-processor interrupts.
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h
index 61454eb..a2e1e14 100644
--- a/cpukit/include/rtems/score/threadimpl.h
+++ b/cpukit/include/rtems/score/threadimpl.h
@@ -122,7 +122,7 @@ void _Thread_Create_idle(void);
  * part of initialization and its invocation is the last act of
  * the non-multitasking part of the system initialization.
  */
-void _Thread_Start_multitasking( void ) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _Thread_Start_multitasking( void );
 
 /**
  * @brief The configuration of a new thread to initialize.
@@ -259,11 +259,11 @@ bool _Thread_Start(
  * @param entry The start entry information for @a executing.
  * @param lock_context The lock context.
  */
-void _Thread_Restart_self(
+RTEMS_NO_RETURN void _Thread_Restart_self(
   Thread_Control                 *executing,
   const Thread_Entry_information *entry,
   ISR_lock_Context               *lock_context
-) RTEMS_NO_RETURN;
+);
 
 /**
  * @brief Restarts the thread.
diff --git a/cpukit/include/rtems/test-info.h b/cpukit/include/rtems/test-info.h
index d5580bd..c4b6041 100644
--- a/cpukit/include/rtems/test-info.h
+++ b/cpukit/include/rtems/test-info.h
@@ -110,7 +110,7 @@ int rtems_test_end(const char* name);
  * @brief Exit the test without calling exit() since it closes stdin, etc and
  * pulls in stdio code
  */
-void rtems_test_exit(int status) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void rtems_test_exit(int status);
 
 /**
  * @brief Prints via the RTEMS printer.
diff --git a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
index da2140a..dc94e59 100644
--- a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
@@ -322,8 +322,7 @@ void _CPU_ISR_install_vector(
  */
 void _CPU_Context_switch( Context_Control *run, Context_Control *heir );
 
-void _CPU_Context_restore( Context_Control *new_context )
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 #ifdef RTEMS_SMP
   uint32_t _CPU_SMP_Initialize( void );
diff --git a/cpukit/score/cpu/arm/include/rtems/score/cpu.h b/cpukit/score/cpu/arm/include/rtems/score/cpu.h
index b90fb1f..8a8e8cc 100644
--- a/cpukit/score/cpu/arm/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/include/rtems/score/cpu.h
@@ -456,12 +456,10 @@ void _CPU_ISR_install_vector(
  */
 void _CPU_Context_switch( Context_Control *run, Context_Control *heir );
 
-void _CPU_Context_restore( Context_Control *new_context )
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 #if defined(ARM_MULTILIB_ARCH_V7M)
-  void _ARMV7M_Start_multitasking( Context_Control *heir )
-    RTEMS_NO_RETURN;
+  RTEMS_NO_RETURN void _ARMV7M_Start_multitasking( Context_Control *heir );
   #define _CPU_Start_multitasking _ARMV7M_Start_multitasking
 #endif
 
diff --git a/cpukit/score/cpu/bfin/include/rtems/score/cpu.h b/cpukit/score/cpu/bfin/include/rtems/score/cpu.h
index 3b0f0be..44be6d7 100644
--- a/cpukit/score/cpu/bfin/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/bfin/include/rtems/score/cpu.h
@@ -571,9 +571,7 @@ void _CPU_Context_switch(
  *
  * XXX document implementation including references if appropriate
  */
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /** @} */
 
diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index 632bf5f..0cb4590 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
@@ -496,8 +496,7 @@ void _CPU_Context_Initialize(
  *    + disable interrupts and halt the CPU
  */
 
-extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Fatal_halt( uint32_t source, uint32_t error );
 
 #endif /* ASM */
 
@@ -582,9 +581,7 @@ void _CPU_Context_switch(
  *  efficient manner and avoid stack conflicts.
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*
  *  _CPU_Context_save_fp
diff --git a/cpukit/score/cpu/lm32/include/rtems/score/cpu.h b/cpukit/score/cpu/lm32/include/rtems/score/cpu.h
index 8e70299..7cf6359 100644
--- a/cpukit/score/cpu/lm32/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/lm32/include/rtems/score/cpu.h
@@ -702,9 +702,7 @@ void _CPU_Context_switch(
  *
  * XXX document implementation including references if appropriate
  */
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /** @} */
 
diff --git a/cpukit/score/cpu/m68k/include/rtems/score/cpu.h b/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
index 777fbfe..5c1df94 100644
--- a/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
@@ -595,9 +595,9 @@ void _CPU_Context_switch(
   Context_Control  *heir
 );
 
-void _CPU_Context_Restart_self(
+RTEMS_NO_RETURN void _CPU_Context_Restart_self(
   Context_Control  *the_context
-) RTEMS_NO_RETURN;
+);
 
 /*
  *  _CPU_Context_save_fp
diff --git a/cpukit/score/cpu/mips/include/rtems/score/cpu.h b/cpukit/score/cpu/mips/include/rtems/score/cpu.h
index 2b662cd..04d33f5 100644
--- a/cpukit/score/cpu/mips/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips/include/rtems/score/cpu.h
@@ -774,9 +774,7 @@ void _CPU_Context_switch(
  *  NOTE: May be unnecessary to reload some registers.
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*
  *  _CPU_Context_save_fp
diff --git a/cpukit/score/cpu/moxie/include/rtems/score/cpu.h b/cpukit/score/cpu/moxie/include/rtems/score/cpu.h
index c47e414..c0a41c9 100644
--- a/cpukit/score/cpu/moxie/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/moxie/include/rtems/score/cpu.h
@@ -478,9 +478,7 @@ void _CPU_Context_switch(
  *
  *  XXX
  */
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /**
  * @brief The set of registers that specifies the complete processor state.
diff --git a/cpukit/score/cpu/nios2/include/rtems/score/cpu.h b/cpukit/score/cpu/nios2/include/rtems/score/cpu.h
index 5528561..5fffed6 100644
--- a/cpukit/score/cpu/nios2/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/nios2/include/rtems/score/cpu.h
@@ -290,8 +290,7 @@ void _CPU_Context_Initialize(
 #define _CPU_Context_Restart_self( _the_context ) \
   _CPU_Context_restore( (_the_context) );
 
-void _CPU_Fatal_halt( uint32_t _source, uint32_t _error )
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Fatal_halt( uint32_t _source, uint32_t _error );
 
 /**
  * @brief CPU initialization.
@@ -310,9 +309,7 @@ void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 void _CPU_Context_switch( Context_Control *run, Context_Control *heir );
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
 
diff --git a/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h
index 50313bb..ea69a5b 100644
--- a/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h
@@ -1085,9 +1085,7 @@ void _CPU_Context_switch(
  *
  * XXX document implementation including references if appropriate
  */
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /**
  * @addtogroup RTEMSScoreCPUExampleContext
diff --git a/cpukit/score/cpu/or1k/include/rtems/score/cpu.h b/cpukit/score/cpu/or1k/include/rtems/score/cpu.h
index c14388a..c1f94a7 100644
--- a/cpukit/score/cpu/or1k/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/or1k/include/rtems/score/cpu.h
@@ -527,9 +527,7 @@ void _CPU_Context_switch(
  *
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*
  *  _CPU_Context_save_fp
diff --git a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
index 33d8755..a40b378 100644
--- a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
@@ -932,9 +932,7 @@ void _CPU_Context_switch(
  *  NOTE: May be unnecessary to reload some registers.
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*
  *  _CPU_Context_save_fp
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
index 501973a..38eb923 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
@@ -213,7 +213,7 @@ void _CPU_Context_Initialize(
 #define _CPU_Context_Restart_self( _the_context ) \
    _CPU_Context_restore( (_the_context) )
 
-extern void _CPU_Fatal_halt(uint32_t source, uint32_t error) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Fatal_halt( uint32_t source, uint32_t error );
 
 #define CPU_USE_GENERIC_BITFIELD_CODE TRUE
 
@@ -393,9 +393,7 @@ void _CPU_Context_switch(
  *
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*  The following routine swaps the endian format of an unsigned int.
  *  It must be static because it is referenced indirectly.
diff --git a/cpukit/score/cpu/sh/include/rtems/score/cpu.h b/cpukit/score/cpu/sh/include/rtems/score/cpu.h
index 9264479..0782021 100644
--- a/cpukit/score/cpu/sh/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/include/rtems/score/cpu.h
@@ -586,9 +586,7 @@ void _CPU_Context_switch(
  *  efficient manner.  It may simply be a label in _CPU_Context_switch.
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*
  *  @brief This routine saves the floating point context passed to it.
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
index 13782f2..e2604bb 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
@@ -912,8 +912,7 @@ void _CPU_Context_Initialize(
  * location or a register, optionally disables interrupts, and
  * halts/stops the CPU.
  */
-extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Fatal_halt( uint32_t source, uint32_t error );
 
 /* end of Fatal Error manager macros */
 
@@ -1001,9 +1000,7 @@ void _CPU_Context_switch(
  *
  * @param[in] new_context is the context to restore
  */
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 #if defined(RTEMS_SMP)
   uint32_t _CPU_SMP_Initialize( void );
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
index 4846520..db659cc 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
@@ -365,8 +365,10 @@ static inline void sparc_enable_interrupts(uint32_t psr)
  * @param[in] exitcode1 Primary exit code stored in CPU g2 register after exit
  * @param[in] exitcode2 Primary exit code stored in CPU g3 register after exit
  */
-void sparc_syscall_exit(uint32_t exitcode1, uint32_t exitcode2)
-  RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void sparc_syscall_exit(
+  uint32_t exitcode1,
+  uint32_t exitcode2
+);
 
 /**
  * @brief SPARC flash processor interrupts.
diff --git a/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
index 2dd5cb1..2701298 100644
--- a/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
@@ -877,9 +877,7 @@ void _CPU_Context_switch(
  *  efficient manner.
  */
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /*
  *  _CPU_Context_save_fp
diff --git a/cpukit/score/cpu/v850/include/rtems/score/cpu.h b/cpukit/score/cpu/v850/include/rtems/score/cpu.h
index a538789..a648931 100644
--- a/cpukit/score/cpu/v850/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/v850/include/rtems/score/cpu.h
@@ -543,9 +543,7 @@ void _CPU_Context_switch(
  *
  * This is implemented in assembly on the v850.
  */
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 /* XXX this should be possible to remove */
 #if 0
diff --git a/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h b/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h
index 12ae14e..80dbc25 100644
--- a/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h
@@ -280,9 +280,7 @@ void _CPU_Context_switch(
   Context_Control  *heir
 );
 
-void _CPU_Context_restore(
-  Context_Control *new_context
-) RTEMS_NO_RETURN;
+RTEMS_NO_RETURN void _CPU_Context_restore( Context_Control *new_context );
 
 typedef struct {
   uint32_t processor_state_register;



More information about the vc mailing list