diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-07 09:53:47 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-12 09:18:00 +0100 |
commit | bab16de2671cc5b35e3df9b343e8645b632e3b1d (patch) | |
tree | f397b31d5a5c2f87e5c3aee69f6cfb39738f7ac2 /cpukit/sapi | |
parent | sparc: Save/restore only non-volatile context (diff) | |
download | rtems-bab16de2671cc5b35e3df9b343e8645b632e3b1d.tar.bz2 |
score: Change debug helper functions
Rename rtems_internal_error_description() to
rtems_internal_error_text(). Rename rtems_fatal_source_description() to
rtems_fatal_source_text(). Rename rtems_status_code_description() to
rtems_status_text(). Remove previous implementation of
rtems_status_text().
Diffstat (limited to 'cpukit/sapi')
-rw-r--r-- | cpukit/sapi/Makefile.am | 4 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/fatal.h | 20 | ||||
-rw-r--r-- | cpukit/sapi/src/fatalsrctext.c (renamed from cpukit/sapi/src/fatalsrcdesc.c) | 18 | ||||
-rw-r--r-- | cpukit/sapi/src/interrtext.c (renamed from cpukit/sapi/src/interrdesc.c) | 18 |
4 files changed, 32 insertions, 28 deletions
diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am index 2a88aa3242..65acfc7a01 100644 --- a/cpukit/sapi/Makefile.am +++ b/cpukit/sapi/Makefile.am @@ -29,8 +29,8 @@ libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \ src/iounregisterdriver.c src/iowrite.c src/posixapi.c \ src/rtemsapi.c src/extensiondata.c src/getversionstring.c \ src/chainappendnotify.c src/chaingetnotify.c src/chaingetwait.c \ - src/chainprependnotify.c src/rbheap.c src/interrdesc.c \ - src/fatal2.c src/fatalsrcdesc.c + src/chainprependnotify.c src/rbheap.c src/interrtext.c \ + src/fatal2.c src/fatalsrctext.c libsapi_a_SOURCES += src/chainsmp.c libsapi_a_CPPFLAGS = $(AM_CPPFLAGS) diff --git a/cpukit/sapi/include/rtems/fatal.h b/cpukit/sapi/include/rtems/fatal.h index 47bf74f279..1230182f2e 100644 --- a/cpukit/sapi/include/rtems/fatal.h +++ b/cpukit/sapi/include/rtems/fatal.h @@ -86,24 +86,28 @@ void rtems_fatal( ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; /** - * @brief Returns a description for a fatal source. + * @brief Returns a text for a fatal source. + * + * The text for each fatal source is the enumerator constant. * * @param[in] source is the fatal source. * - * @retval description The fatal source description. - * @retval ? The passed fatal source is invalid. + * @retval text The fatal source text. + * @retval "?" The passed fatal source is invalid. */ -const char *rtems_fatal_source_description( rtems_fatal_source source ); +const char *rtems_fatal_source_text( rtems_fatal_source source ); /** - * @brief Returns a description for an internal error code. + * @brief Returns a text for an internal error code. + * + * The text for each internal error code is the enumerator constant. * * @param[in] error is the error code. * - * @retval description The error code description. - * @retval ? The passed error code is invalid. + * @retval text The error code text. + * @retval "?" The passed error code is invalid. */ -const char *rtems_internal_error_description( rtems_fatal_code error ); +const char *rtems_internal_error_text( rtems_fatal_code error ); /** @} */ diff --git a/cpukit/sapi/src/fatalsrcdesc.c b/cpukit/sapi/src/fatalsrctext.c index fbe8485853..902a269b59 100644 --- a/cpukit/sapi/src/fatalsrcdesc.c +++ b/cpukit/sapi/src/fatalsrctext.c @@ -1,16 +1,16 @@ /** * @file * - * @brief Implementation of rtems_fatal_source_description() + * @brief Implementation of rtems_fatal_source_text() * * @ingroup ClassicFatal */ /* - * Copyright (c) 2013 embedded brains GmbH. All rights reserved. + * Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved. * * embedded brains GmbH - * Obere Lagerstr. 30 + * Dornierstr. 4 * 82178 Puchheim * Germany * <rtems@embedded-brains.de> @@ -26,7 +26,7 @@ #include <rtems/fatal.h> -static const char *const fatal_source_desc [] = { +static const char *const fatal_source_text[] = { "INTERNAL_ERROR_CORE", "INTERNAL_ERROR_RTEMS_API", "INTERNAL_ERROR_POSIX_API", @@ -40,14 +40,14 @@ static const char *const fatal_source_desc [] = { "RTEMS_FATAL_SOURCE_EXCEPTION" }; -const char *rtems_fatal_source_description( rtems_fatal_source source ) +const char *rtems_fatal_source_text( rtems_fatal_source source ) { size_t i = source; - const char *desc = "?"; + const char *text = "?"; - if ( i < RTEMS_ARRAY_SIZE( fatal_source_desc ) ) { - desc = fatal_source_desc [i]; + if ( i < RTEMS_ARRAY_SIZE( fatal_source_text ) ) { + text = fatal_source_text[ i ]; } - return desc; + return text; } diff --git a/cpukit/sapi/src/interrdesc.c b/cpukit/sapi/src/interrtext.c index 5301475657..a66add5d70 100644 --- a/cpukit/sapi/src/interrdesc.c +++ b/cpukit/sapi/src/interrtext.c @@ -1,16 +1,16 @@ /** * @file * - * @brief Returns a description for an internal error code. + * @brief Returns a text for an internal error code. * * @ingroup ClassicFatal */ /* - * Copyright (c) 2012 embedded brains GmbH. All rights reserved. + * Copyright (c) 2012-2014 embedded brains GmbH. All rights reserved. * * embedded brains GmbH - * Obere Lagerstr. 30 + * Dornierstr. 4 * 82178 Puchheim * Germany * <rtems@embedded-brains.de> @@ -26,7 +26,7 @@ #include <rtems/fatal.h> -static const char *const internal_error_desc [] = { +static const char *const internal_error_text[] = { "INTERNAL_ERROR_NO_CONFIGURATION_TABLE", "INTERNAL_ERROR_NO_CPU_TABLE", "INTERNAL_ERROR_TOO_LITTLE_WORKSPACE", @@ -54,14 +54,14 @@ static const char *const internal_error_desc [] = { "INTERNAL_ERROR_CPU_ISR_INSTALL_VECTOR" }; -const char *rtems_internal_error_description( rtems_fatal_code error ) +const char *rtems_internal_error_text( rtems_fatal_code error ) { size_t i = error; - const char *desc = "?"; + const char *text = "?"; - if ( i < RTEMS_ARRAY_SIZE( internal_error_desc ) ) { - desc = internal_error_desc [i]; + if ( i < RTEMS_ARRAY_SIZE( internal_error_text ) ) { + text = internal_error_text[ i ]; } - return desc; + return text; } |