diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-10-16 08:15:03 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-10-26 09:13:19 +0100 |
commit | 143696acbdd8740eaa8114c7c307ef4834134454 (patch) | |
tree | 1e520c91984f3b806ff00608568a0e2a7113b278 /cpukit/score | |
parent | basedefs.h: Add compiler attributes (diff) | |
download | rtems-143696acbdd8740eaa8114c7c307ef4834134454.tar.bz2 |
basedefs.h: Add and use RTEMS_NO_RETURN
Diffstat (limited to 'cpukit/score')
26 files changed, 36 insertions, 34 deletions
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index 6ed6ef9a1f..ae33b572af 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -489,11 +489,11 @@ void _CPU_ISR_install_vector( void _CPU_Context_switch( Context_Control *run, Context_Control *heir ); void _CPU_Context_restore( Context_Control *new_context ) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; #if defined(ARM_MULTILIB_ARCH_V7M) void _ARMV7M_Start_multitasking( Context_Control *heir ) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; #define _CPU_Start_multitasking _ARMV7M_Start_multitasking #endif diff --git a/cpukit/score/cpu/avr/rtems/score/cpu.h b/cpukit/score/cpu/avr/rtems/score/cpu.h index fc5cc595ba..f3baec4451 100644 --- a/cpukit/score/cpu/avr/rtems/score/cpu.h +++ b/cpukit/score/cpu/avr/rtems/score/cpu.h @@ -1066,7 +1066,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h index 52fb3f8a5e..ebcfe1e15e 100644 --- a/cpukit/score/cpu/bfin/rtems/score/cpu.h +++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h @@ -1149,7 +1149,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * This routine saves the floating point context passed to it. diff --git a/cpukit/score/cpu/epiphany/rtems/score/cpu.h b/cpukit/score/cpu/epiphany/rtems/score/cpu.h index e0c5682db4..d0cbb64b44 100644 --- a/cpukit/score/cpu/epiphany/rtems/score/cpu.h +++ b/cpukit/score/cpu/epiphany/rtems/score/cpu.h @@ -948,7 +948,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/h8300/rtems/score/cpu.h b/cpukit/score/cpu/h8300/rtems/score/cpu.h index 56b3fdbf29..8b34bb4c7f 100644 --- a/cpukit/score/cpu/h8300/rtems/score/cpu.h +++ b/cpukit/score/cpu/h8300/rtems/score/cpu.h @@ -1060,7 +1060,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h index 96cea5a207..4f0cd6e6b0 100644 --- a/cpukit/score/cpu/i386/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h @@ -649,7 +649,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h index 4cd07ba7bb..e783331cc7 100644 --- a/cpukit/score/cpu/lm32/rtems/score/cpu.h +++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h @@ -1152,7 +1152,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * This routine saves the floating point context passed to it. diff --git a/cpukit/score/cpu/m32c/rtems/score/cpu.h b/cpukit/score/cpu/m32c/rtems/score/cpu.h index 6ca79729c6..fdee5729ed 100644 --- a/cpukit/score/cpu/m32c/rtems/score/cpu.h +++ b/cpukit/score/cpu/m32c/rtems/score/cpu.h @@ -819,7 +819,7 @@ void _CPU_Context_Initialize( */ void _CPU_Context_Restart_self( Context_Control *the_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * @ingroup CPUContext @@ -1136,7 +1136,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; static inline void _CPU_Context_volatile_clobber( uintptr_t pattern ) { diff --git a/cpukit/score/cpu/m32r/rtems/score/cpu.h b/cpukit/score/cpu/m32r/rtems/score/cpu.h index 311578db7c..9ad41cd2c6 100644 --- a/cpukit/score/cpu/m32r/rtems/score/cpu.h +++ b/cpukit/score/cpu/m32r/rtems/score/cpu.h @@ -840,7 +840,7 @@ void _CPU_Context_Initialize( */ void _CPU_Context_Restart_self( Context_Control *the_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * @ingroup CPUContext @@ -1145,7 +1145,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * This routine saves the floating point context passed to it. diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h index 913bb78a71..7fcbac54a8 100644 --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h @@ -679,7 +679,7 @@ void _CPU_Context_switch( void _CPU_Context_Restart_self( Context_Control *the_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h index 4e426f8bcc..ac589d2a68 100644 --- a/cpukit/score/cpu/mips/rtems/score/cpu.h +++ b/cpukit/score/cpu/mips/rtems/score/cpu.h @@ -1083,7 +1083,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/moxie/rtems/score/cpu.h b/cpukit/score/cpu/moxie/rtems/score/cpu.h index 3422d0205e..297316bfeb 100644 --- a/cpukit/score/cpu/moxie/rtems/score/cpu.h +++ b/cpukit/score/cpu/moxie/rtems/score/cpu.h @@ -938,7 +938,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h index d9a7bbdf53..fdb9d8aaef 100644 --- a/cpukit/score/cpu/nios2/rtems/score/cpu.h +++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h @@ -306,7 +306,7 @@ void _CPU_Context_Initialize( _CPU_Context_restore( (_the_context) ); void _CPU_Fatal_halt( uint32_t _source, uint32_t _error ) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; /** * @brief CPU initialization. @@ -335,7 +335,7 @@ void _CPU_Context_switch( Context_Control *run, Context_Control *heir ); void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; void _CPU_Context_volatile_clobber( uintptr_t pattern ); diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h index 37557096bc..49b2d65385 100644 --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h @@ -1310,7 +1310,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * @ingroup CPUContext diff --git a/cpukit/score/cpu/or1k/rtems/score/cpu.h b/cpukit/score/cpu/or1k/rtems/score/cpu.h index 21cbb6d5ce..7d07de34b0 100644 --- a/cpukit/score/cpu/or1k/rtems/score/cpu.h +++ b/cpukit/score/cpu/or1k/rtems/score/cpu.h @@ -950,7 +950,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index 7fef878599..c30b9dc967 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -1070,7 +1070,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h index 76220f7215..6ae0a83771 100644 --- a/cpukit/score/cpu/sh/rtems/score/cpu.h +++ b/cpukit/score/cpu/sh/rtems/score/cpu.h @@ -851,7 +851,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * @brief This routine saves the floating point context passed to it. diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h index d35846521e..b73a56e0c0 100644 --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h @@ -1108,7 +1108,7 @@ void _CPU_Context_Initialize( * halts/stops the CPU. */ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; /* end of Fatal Error manager macros */ @@ -1196,7 +1196,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /** * @brief The pointer to the current per-CPU control is available via register diff --git a/cpukit/score/cpu/sparc/rtems/score/sparc.h b/cpukit/score/cpu/sparc/rtems/score/sparc.h index 45df6ff035..ecac74de3c 100644 --- a/cpukit/score/cpu/sparc/rtems/score/sparc.h +++ b/cpukit/score/cpu/sparc/rtems/score/sparc.h @@ -353,7 +353,7 @@ static inline void sparc_enable_interrupts(uint32_t psr) * @param[in] exitcode2 Primary exit code stored in CPU g3 register after exit */ void sparc_syscall_exit(uint32_t exitcode1, uint32_t exitcode2) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; /** * @brief SPARC flash processor interrupts. diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h index 37e8325f97..ff56c7121a 100644 --- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h @@ -976,7 +976,7 @@ void _CPU_Context_switch( void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* * _CPU_Context_save_fp diff --git a/cpukit/score/cpu/v850/rtems/score/cpu.h b/cpukit/score/cpu/v850/rtems/score/cpu.h index 97259009d1..c531d0c131 100644 --- a/cpukit/score/cpu/v850/rtems/score/cpu.h +++ b/cpukit/score/cpu/v850/rtems/score/cpu.h @@ -1051,7 +1051,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; /* XXX this should be possible to remove */ #if 0 diff --git a/cpukit/score/include/rtems/score/assert.h b/cpukit/score/include/rtems/score/assert.h index 63083784fa..d4253f87da 100644 --- a/cpukit/score/include/rtems/score/assert.h +++ b/cpukit/score/include/rtems/score/assert.h @@ -61,7 +61,7 @@ extern "C" { /* normal build is newlib. */ void __assert_func(const char *, int, const char *, const char *) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; #define _Assert( _e ) \ ( ( _e ) ? \ diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h index 8e145f58e6..5575a068c7 100644 --- a/cpukit/score/include/rtems/score/basedefs.h +++ b/cpukit/score/include/rtems/score/basedefs.h @@ -154,14 +154,16 @@ * rtems_fatal_error_occurred and _Terminate. */ #if defined(RTEMS_SCHEDSIM) - #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE + #define RTEMS_NO_RETURN #elif defined(__GNUC__) - #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE \ - __attribute__ ((noreturn)) + #define RTEMS_NO_RETURN __attribute__((__noreturn__)) #else - #define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE + #define RTEMS_NO_RETURN #endif +/* Provided for backward compatibility */ +#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE RTEMS_NO_RETURN + /** * The following defines a compiler specific attribute which informs * the compiler that the method has no effect except the return value diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h index 988a00dd44..f09d6e90a5 100644 --- a/cpukit/score/include/rtems/score/interr.h +++ b/cpukit/score/include/rtems/score/interr.h @@ -228,7 +228,7 @@ void _Terminate( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error -) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; +) RTEMS_NO_RETURN; #ifdef __cplusplus } diff --git a/cpukit/score/include/rtems/score/smpimpl.h b/cpukit/score/include/rtems/score/smpimpl.h index 3167e82a82..09c47ecf16 100644 --- a/cpukit/score/include/rtems/score/smpimpl.h +++ b/cpukit/score/include/rtems/score/smpimpl.h @@ -115,7 +115,7 @@ static inline void _SMP_Fatal( SMP_Fatal_code code ) * This function does not return to the caller. */ void _SMP_Start_multitasking_on_secondary_processor( void ) - RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; + RTEMS_NO_RETURN; typedef void ( *SMP_Test_message_handler )( Per_CPU_Control *cpu_self ); diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 7412bd9633..906bdb1862 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -132,7 +132,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_COMPILER_NO_RETURN_ATTRIBUTE; +void _Thread_Start_multitasking( void ) RTEMS_NO_RETURN; /** * @brief Allocate the requested stack space for the thread. |