mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 14:18:09 +08:00
2007-11-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/system.h, score/include/rtems/score/interr.h: Add compiler conditional attribute for methods that do not return. This avoids gcc generating unreachable code following calls to _Internal_error_Occurred.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2007-11-07 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* score/include/rtems/system.h, score/include/rtems/score/interr.h: Add
|
||||
compiler conditional attribute for methods that do not return. This
|
||||
avoids gcc generating unreachable code following calls to
|
||||
_Internal_error_Occurred.
|
||||
|
||||
2007-11-06 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* configure.ac: Add ARM/Thumb Makefile.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -91,7 +91,7 @@ void _Internal_error_Occurred(
|
||||
Internal_errors_Source the_source,
|
||||
boolean is_internal,
|
||||
uint32_t the_error
|
||||
);
|
||||
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2006.
|
||||
* COPYRIGHT (c) 1989-2007.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -124,6 +124,20 @@ extern "C" {
|
||||
#define RTEMS_COMPILER_MEMORY_BARRIER()
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The following macro is a compiler specific way to indicate that
|
||||
* the method will NOT return to the caller. This can assist the
|
||||
* compiler in code generation and avoid unreachable paths. This
|
||||
* can impact the code generated following calls to
|
||||
* rtems_fatal_error_occurred and _Internal_error_Occurred.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE \
|
||||
__attribute__ ((noreturn))
|
||||
#else
|
||||
#define RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_POSIX_API
|
||||
/** The following is used by the POSIX implementation to catch bad paths. */
|
||||
int POSIX_MP_NOT_IMPLEMENTED( void );
|
||||
|
||||
Reference in New Issue
Block a user