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:
Joel Sherrill
2007-11-07 15:26:43 +00:00
parent bf0a3b24e0
commit 7d12442c4d
3 changed files with 24 additions and 3 deletions
+7
View File
@@ -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.
+2 -2
View File
@@ -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
}
+15 -1
View File
@@ -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 );