summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/startup/panic.c2
-rw-r--r--cpukit/libcsupport/include/rtems/error.h2
-rw-r--r--cpukit/libcsupport/src/error.c42
-rw-r--r--cpukit/rtems/Makefile.am2
-rw-r--r--cpukit/rtems/include/rtems/rtems/status.h10
-rw-r--r--cpukit/rtems/src/statustext.c (renamed from cpukit/rtems/src/statusdesc.c)12
-rw-r--r--cpukit/sapi/Makefile.am4
-rw-r--r--cpukit/sapi/include/rtems/fatal.h20
-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
10 files changed, 46 insertions, 84 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/panic.c b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
index 4553f77119..f832054220 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/panic.c
+++ b/c/src/lib/libbsp/powerpc/shared/startup/panic.c
@@ -39,7 +39,7 @@ void _BSP_Fatal_error(unsigned int v)
switch (THESRC) {
case INTERNAL_ERROR_CORE:
printk(" RTEMS Core\n");
- err = rtems_internal_error_description(THEERR);
+ err = rtems_internal_error_text(THEERR);
break;
case INTERNAL_ERROR_RTEMS_API:
diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h
index 95567631c0..cbcfa98614 100644
--- a/cpukit/libcsupport/include/rtems/error.h
+++ b/cpukit/libcsupport/include/rtems/error.h
@@ -84,8 +84,6 @@ typedef Internal_errors_t rtems_error_code_t;
#define RTEMS_ERROR_MASK \
(RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | RTEMS_ERROR_PANIC) /* all */
-const char *rtems_status_text(rtems_status_code sc);
-
/**
* @brief Report an Error
*
diff --git a/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c
index 0e63fa4022..81ddae251a 100644
--- a/cpukit/libcsupport/src/error.c
+++ b/cpukit/libcsupport/src/error.c
@@ -24,48 +24,6 @@
int rtems_panic_in_progress;
-const rtems_assoc_t rtems_status_assoc[] = {
- { "successful completion", RTEMS_SUCCESSFUL, 0 },
- { "returned from a thread", RTEMS_TASK_EXITTED, 0 },
- { "multiprocessing not configured", RTEMS_MP_NOT_CONFIGURED, 0 },
- { "invalid object name", RTEMS_INVALID_NAME, 0 },
- { "invalid object id", RTEMS_INVALID_ID, 0 },
- { "too many", RTEMS_TOO_MANY, 0 },
- { "timed out waiting", RTEMS_TIMEOUT, 0 },
- { "object deleted while waiting", RTEMS_OBJECT_WAS_DELETED, 0 },
- { "specified size was invalid", RTEMS_INVALID_SIZE, 0 },
- { "address specified is invalid", RTEMS_INVALID_ADDRESS, 0 },
- { "number was invalid", RTEMS_INVALID_NUMBER, 0 },
- { "item has not been initialized", RTEMS_NOT_DEFINED, 0 },
- { "resources still outstanding", RTEMS_RESOURCE_IN_USE, 0 },
- { "request not satisfied", RTEMS_UNSATISFIED, 0 },
- { "thread is in wrong state", RTEMS_INCORRECT_STATE, 0 },
- { "thread already in state", RTEMS_ALREADY_SUSPENDED, 0 },
- { "illegal on calling thread", RTEMS_ILLEGAL_ON_SELF, 0 },
- { "illegal for remote object", RTEMS_ILLEGAL_ON_REMOTE_OBJECT, 0 },
- { "called from wrong environment", RTEMS_CALLED_FROM_ISR, 0 },
- { "invalid thread priority", RTEMS_INVALID_PRIORITY, 0 },
- { "invalid date/time", RTEMS_INVALID_CLOCK, 0 },
- { "invalid node id", RTEMS_INVALID_NODE, 0 },
- { "directive not configured", RTEMS_NOT_CONFIGURED, 0 },
- { "not owner of resource", RTEMS_NOT_OWNER_OF_RESOURCE , 0 },
- { "directive not implemented", RTEMS_NOT_IMPLEMENTED, 0 },
- { "RTEMS inconsistency detected", RTEMS_INTERNAL_ERROR, 0 },
- { "could not get enough memory", RTEMS_NO_MEMORY, 0 },
- { "driver IO error", RTEMS_IO_ERROR, 0 },
- { "internal multiprocessing only", THREAD_STATUS_PROXY_BLOCKING, 0 },
- { 0, 0, 0 },
-};
-
-
-const char *rtems_status_text(
- rtems_status_code status
-)
-{
- return rtems_assoc_name_by_local(rtems_status_assoc, status);
-}
-
-
int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index f219db8d7b..6688317061 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -255,7 +255,7 @@ librtems_a_SOURCES += src/workspacegreedy.c
librtems_a_SOURCES += src/modes.c
librtems_a_SOURCES += src/status.c
-librtems_a_SOURCES += src/statusdesc.c
+librtems_a_SOURCES += src/statustext.c
if HAS_MP
# We only build multiprocessing related files if HAS_MP was defined
diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h
index 19df500497..f82b1f477c 100644
--- a/cpukit/rtems/include/rtems/rtems/status.h
+++ b/cpukit/rtems/include/rtems/rtems/status.h
@@ -242,14 +242,16 @@ RTEMS_INLINE_ROUTINE bool rtems_are_statuses_equal(
int rtems_status_code_to_errno(rtems_status_code sc);
/**
- * @brief Returns a description for a status code.
+ * @brief Returns a text for a status code.
+ *
+ * The text for each status code is the enumerator constant.
*
* @param[in] code The status code.
*
- * @retval description The status code description.
- * @retval ? The passed status code is invalid.
+ * @retval text The status code text.
+ * @retval "?" The passed status code is invalid.
*/
-const char *rtems_status_code_description( rtems_status_code code );
+const char *rtems_status_text( rtems_status_code code );
/**@}*/
diff --git a/cpukit/rtems/src/statusdesc.c b/cpukit/rtems/src/statustext.c
index 4cc426d0a9..bdb91bbb5c 100644
--- a/cpukit/rtems/src/statusdesc.c
+++ b/cpukit/rtems/src/statustext.c
@@ -24,7 +24,7 @@
#include <rtems.h>
-static const char *const status_code_desc[] = {
+static const char *const status_code_text[] = {
"RTEMS_SUCCESSFUL",
"RTEMS_TASK_EXITTED",
"RTEMS_MP_NOT_CONFIGURED",
@@ -56,14 +56,14 @@ static const char *const status_code_desc[] = {
"RTEMS_PROXY_BLOCKING"
};
-const char *rtems_status_code_description( rtems_status_code code )
+const char *rtems_status_text( rtems_status_code code )
{
size_t i = code;
- const char *desc = "?";
+ const char *text = "?";
- if ( i < RTEMS_ARRAY_SIZE( status_code_desc ) ) {
- desc = status_code_desc [i];
+ if ( i < RTEMS_ARRAY_SIZE( status_code_text ) ) {
+ text = status_code_text [i];
}
- return desc;
+ return text;
}
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;
}