forked from Imagelibrary/rtems
basedefs.h: Add and use RTEMS_NO_RETURN
This commit is contained in:
@@ -100,7 +100,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_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
void boot_card(const char *cmdline) RTEMS_NO_RETURN;
|
||||
|
||||
#ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK
|
||||
/**
|
||||
|
||||
@@ -120,7 +120,7 @@ typedef enum {
|
||||
QORIQ_FATAL_FDT_NO_TIMEBASE_FREQUENCY
|
||||
} bsp_fatal_code;
|
||||
|
||||
RTEMS_COMPILER_NO_RETURN_ATTRIBUTE static inline void
|
||||
RTEMS_NO_RETURN static inline void
|
||||
bsp_fatal( bsp_fatal_code code )
|
||||
{
|
||||
rtems_fatal( RTEMS_FATAL_SOURCE_BSP, (rtems_fatal_code) code );
|
||||
|
||||
@@ -376,7 +376,7 @@ void leon3_ext_irq_init(void);
|
||||
|
||||
void bsp_debug_uart_init(void);
|
||||
|
||||
void leon3_power_down_loop(void) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
void leon3_power_down_loop(void) RTEMS_NO_RETURN;
|
||||
|
||||
static inline uint32_t leon3_get_cpu_count(
|
||||
volatile struct irqmp_regs *irqmp
|
||||
|
||||
@@ -130,7 +130,7 @@ int rtems_verror(
|
||||
void rtems_panic(
|
||||
const char *printf_format,
|
||||
...
|
||||
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
) RTEMS_NO_RETURN;
|
||||
|
||||
extern int rtems_panic_in_progress;
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void rtems_stack_checker_begin_extension(
|
||||
void Stack_check_report_blown_task(
|
||||
Thread_Control *running,
|
||||
bool pattern_ok
|
||||
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
) RTEMS_NO_RETURN;
|
||||
|
||||
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef _RTEMS_FATAL_H
|
||||
#define _RTEMS_FATAL_H
|
||||
|
||||
#include <rtems/score/basedefs.h> /* RTEMS_COMPILER_NO_RETURN_ATTRIBUTE */
|
||||
#include <rtems/score/basedefs.h> /* RTEMS_NO_RETURN */
|
||||
#include <rtems/extension.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -70,7 +70,7 @@ static inline void rtems_exception_frame_print(
|
||||
*/
|
||||
void rtems_fatal_error_occurred(
|
||||
uint32_t the_error
|
||||
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
) RTEMS_NO_RETURN;
|
||||
|
||||
/**
|
||||
* @brief Invokes the internal error handler with is internal set to false.
|
||||
@@ -83,7 +83,7 @@ void rtems_fatal_error_occurred(
|
||||
void rtems_fatal(
|
||||
rtems_fatal_source source,
|
||||
rtems_fatal_code error
|
||||
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
) RTEMS_NO_RETURN;
|
||||
|
||||
/**
|
||||
* @brief Returns a text for a fatal source.
|
||||
|
||||
@@ -86,7 +86,7 @@ void rtems_initialize_device_drivers(void);
|
||||
* This directive does not return.
|
||||
*/
|
||||
void rtems_initialize_start_multitasking(void)
|
||||
RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
RTEMS_NO_RETURN;
|
||||
|
||||
/**
|
||||
* @brief Shutdown the RTEMS environment.
|
||||
@@ -99,7 +99,7 @@ void rtems_initialize_start_multitasking(void)
|
||||
*/
|
||||
void rtems_shutdown_executive(
|
||||
uint32_t result
|
||||
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
) RTEMS_NO_RETURN;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ) ? \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user