summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-06 07:39:44 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-10 14:00:37 +0200
commitd7a48e1b259316533a5c775e27934760e1fcd313 (patch)
treeba60f54f4647a8d866395450183ef2551bf9d46d
parente1a0e0c30829a0da4174085ee5109fba337dba11 (diff)
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.
-rw-r--r--bsps/include/bsp/bootcard.h2
-rw-r--r--bsps/powerpc/qoriq/include/bsp.h6
-rw-r--r--bsps/sparc/leon3/include/leon.h2
-rw-r--r--cpukit/include/rtems/fatal.h6
-rw-r--r--cpukit/include/rtems/init.h7
-rw-r--r--cpukit/include/rtems/rtems/tasks.h2
-rw-r--r--cpukit/include/rtems/score/assert.h3
-rw-r--r--cpukit/include/rtems/score/basedefs.h8
-rw-r--r--cpukit/include/rtems/score/interr.h6
-rw-r--r--cpukit/include/rtems/score/smpimpl.h4
-rw-r--r--cpukit/include/rtems/score/threadimpl.h6
-rw-r--r--cpukit/include/rtems/test-info.h2
-rw-r--r--cpukit/score/cpu/aarch64/include/rtems/score/cpu.h3
-rw-r--r--cpukit/score/cpu/arm/include/rtems/score/cpu.h6
-rw-r--r--cpukit/score/cpu/bfin/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/i386/include/rtems/score/cpu.h7
-rw-r--r--cpukit/score/cpu/lm32/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/m68k/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/mips/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/moxie/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/nios2/include/rtems/score/cpu.h7
-rw-r--r--cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/or1k/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/powerpc/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/riscv/include/rtems/score/cpu.h6
-rw-r--r--cpukit/score/cpu/sh/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/sparc/include/rtems/score/cpu.h7
-rw-r--r--cpukit/score/cpu/sparc/include/rtems/score/sparc.h6
-rw-r--r--cpukit/score/cpu/sparc64/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/v850/include/rtems/score/cpu.h4
-rw-r--r--cpukit/score/cpu/x86_64/include/rtems/score/cpu.h4
31 files changed, 52 insertions, 92 deletions
diff --git a/bsps/include/bsp/bootcard.h b/bsps/include/bsp/bootcard.h
index e3eed8da46..0277dd8439 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 1f5ca7f35d..75bf15cefb 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 d25825c8e8..f70fae5709 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 3fc6a89a78..228e7462e0 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 86b1408d64..552017f0de 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 f685c315e3..4e2e38d829 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 6c68d9d28d..649d59b7e9 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 c31b4ebef7..0244af1471 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 1371e55653..85767d0bc5 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 dbca09d5cb..1ba16fb135 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 61454eb7fe..a2e1e1427c 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 d5580bdebb..c4b6041403 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 da2140a2a8..dc94e59831 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 b90fb1f394..8a8e8cc617 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 3b0f0bece3..44be6d7d54 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 632bf5ff38..0cb4590087 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 8e702992c1..7cf6359419 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 777fbfeb30..5c1df94fc5 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 2b662cd549..04d33f5658 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 c47e414f92..c0a41c9db6 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 5528561d1c..5fffed646e 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 50313bbd61..ea69a5b972 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 c14388a804..c1f94a71af 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 33d8755ba4..a40b378b6d 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 501973a6dc..38eb92394d 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 9264479153..0782021b2f 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 13782f2f12..e2604bb76f 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 4846520b46..db659cc1fa 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 2dd5cb194f..2701298733 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 a538789a58..a648931fb9 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 12ae14e229..80dbc25214 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;