diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-28 22:13:55 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-28 22:13:55 +0000 |
commit | 1d33ecab00b86b4eca5fa78d538b92f49e4293ed (patch) | |
tree | 9294a4cdf51e6d7ecc7abf6adc80108e5b17020a /cpukit/libcsupport/include/rtems/error.h | |
parent | 2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-1d33ecab00b86b4eca5fa78d538b92f49e4293ed.tar.bz2 |
2010-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/include/rtems/error.h, libcsupport/src/error.c: Clean up
so rtems_panic() can be a noreturn method. This eliminates some
unreachable and thus untestable code.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/include/rtems/error.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h index ec5dec99d9..51650ea53b 100644 --- a/cpukit/libcsupport/include/rtems/error.h +++ b/cpukit/libcsupport/include/rtems/error.h @@ -34,22 +34,19 @@ typedef Internal_errors_t rtems_error_code_t; #define RTEMS_ERROR_ABORT (0x10000000) /* err is fatal; panic */ #endif -#define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \ - RTEMS_ERROR_PANIC) /* all */ +#define RTEMS_ERROR_MASK \ + (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | RTEMS_ERROR_PANIC) /* all */ const char *rtems_status_text(rtems_status_code); -int rtems_error(rtems_error_code_t error_code, const char *printf_format, ...); -#ifdef __GNUC__ -void rtems_panic(const char *printf_format, ...); -/* - * We should be able to use this attribute but gcc complains that - * rtems_panic does in fact return. :( - * - * __attribute__ ((__noreturn__)); - */ -#else -void rtems_panic(const char *printf_format, ...); -#endif +int rtems_error( + rtems_error_code_t error_code, + const char *printf_format, + ... +); +void rtems_panic( + const char *printf_format, + ... +) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; extern int rtems_panic_in_progress; |