summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-06 16:00:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-07 06:31:46 +0200
commit089e68181e70aa96802f8ebe0acf6af73c02f5ae (patch)
treead9615c3af96458cea8d9c1b19645b1724bc9cb5 /cpukit/rtems
parentscore: Fix internal error status number (diff)
downloadrtems-089e68181e70aa96802f8ebe0acf6af73c02f5ae.tar.bz2
score: Replace Objects_Name_or_id_lookup_errors
Replace Objects_Name_or_id_lookup_errors with new Status_Control codes. Get rid of the _Status_Object_name_errors_to_status lookup table.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/rtemsnametoid.c4
-rw-r--r--cpukit/rtems/src/rtemsobjectgetclassicname.c6
-rw-r--r--cpukit/rtems/src/status.c31
-rw-r--r--cpukit/rtems/src/taskconstruct.c4
4 files changed, 9 insertions, 36 deletions
diff --git a/cpukit/rtems/src/rtemsnametoid.c b/cpukit/rtems/src/rtemsnametoid.c
index d9b374bc3c..5f04ce5153 100644
--- a/cpukit/rtems/src/rtemsnametoid.c
+++ b/cpukit/rtems/src/rtemsnametoid.c
@@ -48,9 +48,9 @@ rtems_status_code _RTEMS_Name_to_id(
const Objects_Information *information
)
{
- Objects_Name_or_id_lookup_errors status;
+ Status_Control status;
status = _Objects_Name_to_id_u32( name, node, id, information );
- return _Status_Object_name_errors_to_status[ status ];
+ return _Status_Get( status );
}
diff --git a/cpukit/rtems/src/rtemsobjectgetclassicname.c b/cpukit/rtems/src/rtemsobjectgetclassicname.c
index 52d4f8474b..0d604e6f9e 100644
--- a/cpukit/rtems/src/rtemsobjectgetclassicname.c
+++ b/cpukit/rtems/src/rtemsobjectgetclassicname.c
@@ -29,8 +29,8 @@ rtems_status_code rtems_object_get_classic_name(
rtems_name *name
)
{
- Objects_Name_or_id_lookup_errors status;
- Objects_Name name_u;
+ Status_Control status;
+ Objects_Name name_u;
if ( !name )
return RTEMS_INVALID_ADDRESS;
@@ -38,5 +38,5 @@ rtems_status_code rtems_object_get_classic_name(
status = _Objects_Id_to_name( id, &name_u );
*name = name_u.name_u32;
- return _Status_Object_name_errors_to_status[ status ];
+ return _Status_Get( status );
}
diff --git a/cpukit/rtems/src/status.c b/cpukit/rtems/src/status.c
deleted file mode 100644
index a4aebd2c05..0000000000
--- a/cpukit/rtems/src/status.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * @file
- *
- * @ingroup RTEMSImplClassic
- *
- * @brief This source file contains the definition of
- * ::_Status_Object_name_errors_to_status.
- */
-
-/* COPYRIGHT (c) 1989-2013.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/rtems/statusimpl.h>
-
-const rtems_status_code _Status_Object_name_errors_to_status[] = {
- /** This maps OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL to RTEMS_SUCCESSFUL. */
- RTEMS_SUCCESSFUL,
- /** This maps OBJECTS_INVALID_NAME to RTEMS_INVALID_NAME. */
- RTEMS_INVALID_NAME,
- /** This maps OBJECTS_INVALID_ADDRESS to RTEMS_INVALID_ADDRESS. */
- RTEMS_INVALID_ADDRESS,
- /** This maps OBJECTS_INVALID_ID to RTEMS_INVALID_ID. */
- RTEMS_INVALID_ID,
- /** This maps OBJECTS_INVALID_NODE to RTEMS_INVALID_NODE. */
- RTEMS_INVALID_NODE
-};
diff --git a/cpukit/rtems/src/taskconstruct.c b/cpukit/rtems/src/taskconstruct.c
index 2cddb448f6..a39db3a7ae 100644
--- a/cpukit/rtems/src/taskconstruct.c
+++ b/cpukit/rtems/src/taskconstruct.c
@@ -43,6 +43,10 @@
STATUS_ASSERT( INCORRECT_STATE );
STATUS_ASSERT( INTERNAL_ERROR );
+STATUS_ASSERT( INVALID_ADDRESS );
+STATUS_ASSERT( INVALID_ID );
+STATUS_ASSERT( INVALID_NAME );
+STATUS_ASSERT( INVALID_NODE );
STATUS_ASSERT( INVALID_NUMBER );
STATUS_ASSERT( INVALID_PRIORITY );
STATUS_ASSERT( INVALID_SIZE );