diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-06 16:00:35 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-04-07 06:31:46 +0200 |
commit | 089e68181e70aa96802f8ebe0acf6af73c02f5ae (patch) | |
tree | ad9615c3af96458cea8d9c1b19645b1724bc9cb5 /cpukit/include/rtems/score | |
parent | score: Fix internal error status number (diff) | |
download | rtems-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/include/rtems/score')
-rw-r--r-- | cpukit/include/rtems/score/objectimpl.h | 44 | ||||
-rw-r--r-- | cpukit/include/rtems/score/objectmp.h | 8 | ||||
-rw-r--r-- | cpukit/include/rtems/score/status.h | 12 |
3 files changed, 23 insertions, 41 deletions
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h index 8ba8189976..54d6f0841b 100644 --- a/cpukit/include/rtems/score/objectimpl.h +++ b/cpukit/include/rtems/score/objectimpl.h @@ -190,36 +190,6 @@ unsigned int _Objects_API_maximum_class( Objects_Control *_Objects_Allocate( Objects_Information *information ); /** - * This function implements the common portion of the object - * identification directives. This directive returns the object - * id associated with name. If more than one object of this class - * is named name, then the object to which the id belongs is - * arbitrary. Node indicates the extent of the search for the - * id of the object named name. If the object class supports global - * objects, then the search can be limited to a particular node - * or allowed to encompass all nodes. - */ -typedef enum { - OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL, - OBJECTS_INVALID_NAME, - OBJECTS_INVALID_ADDRESS, - OBJECTS_INVALID_ID, - OBJECTS_INVALID_NODE -} Objects_Name_or_id_lookup_errors; - -/** - * This macro defines the first entry in the - * @ref Objects_Name_or_id_lookup_errors enumerated list. - */ -#define OBJECTS_NAME_ERRORS_FIRST OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL - -/** - * This macro defines the last entry in the - * @ref Objects_Name_or_id_lookup_errors enumerated list. - */ -#define OBJECTS_NAME_ERRORS_LAST OBJECTS_INVALID_NODE - -/** * @brief Searches an object of the specified class with the specified name on * the specified set of nodes. * @@ -233,12 +203,12 @@ typedef enum { * operation was successful. * @param information is the pointer to an object class information block. * - * @retval OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL The operations was successful. - * @retval OBJECTS_INVALID_ADDRESS The id parameter was NULL. - * @retval OBJECTS_INVALID_NAME No object exists with the specified name on the + * @retval STATUS_SUCCESSFUL The operations was successful. + * @retval STATUS_INVALID_ADDRESS The id parameter was NULL. + * @retval STATUS_INVALID_NAME No object exists with the specified name on the * specified node set. */ -Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32( +Status_Control _Objects_Name_to_id_u32( uint32_t name, uint32_t node, Objects_Id *id, @@ -282,13 +252,13 @@ Objects_Control *_Objects_Get_by_name( * @param id is the Id of the object whose name we are locating. * @param[out] name will contain the name of the object, if found. * - * @retval OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL The operation succeeded. @a name + * @retval STATUS_SUCCESSFUL The operation succeeded. @a name * contains the name of the object. - * @retval OBJECTS_INVALID_ID The id is invalid, the operation failed. + * @retval STATUS_INVALID_ID The id is invalid, the operation failed. * * @note This function currently does not support string names. */ -Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( +Status_Control _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ); diff --git a/cpukit/include/rtems/score/objectmp.h b/cpukit/include/rtems/score/objectmp.h index 4f41fefe40..9107e2b3b6 100644 --- a/cpukit/include/rtems/score/objectmp.h +++ b/cpukit/include/rtems/score/objectmp.h @@ -143,12 +143,12 @@ void _Objects_MP_Close ( * @param nodes_to_search Indicates the set of nodes to search. * @param[out] the_id will contain the Id of the object if found. * - * @retval OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL The lookup was successful. - * @retval OBJECTS_INVALID_NODE The number of nodes is bigger than the + * @retval STATUS_SUCCESSFUL The lookup was successful. + * @retval STATUS_INVALID_NODE The number of nodes is bigger than the * objects maximum nodes value. - * @retval OBJECTS_INVALID_NAME There is no global object with this name. + * @retval STATUS_INVALID_NAME There is no global object with this name. */ -Objects_Name_or_id_lookup_errors _Objects_MP_Global_name_search ( +Status_Control _Objects_MP_Global_name_search ( const Objects_Information *information, Objects_Name the_name, uint32_t nodes_to_search, diff --git a/cpukit/include/rtems/score/status.h b/cpukit/include/rtems/score/status.h index a1c3c84b4d..ba3910d40d 100644 --- a/cpukit/include/rtems/score/status.h +++ b/cpukit/include/rtems/score/status.h @@ -51,6 +51,10 @@ extern "C" { typedef enum { STATUS_CLASSIC_INCORRECT_STATE = 14, STATUS_CLASSIC_INTERNAL_ERROR = 25, + STATUS_CLASSIC_INVALID_ADDRESS = 9, + STATUS_CLASSIC_INVALID_ID = 4, + STATUS_CLASSIC_INVALID_NAME = 3, + STATUS_CLASSIC_INVALID_NODE = 21, STATUS_CLASSIC_INVALID_NUMBER = 10, STATUS_CLASSIC_INVALID_PRIORITY = 19, STATUS_CLASSIC_INVALID_SIZE = 8, @@ -102,6 +106,14 @@ typedef enum { STATUS_BUILD( STATUS_CLASSIC_INCORRECT_STATE, EINVAL ), STATUS_INTERRUPTED = STATUS_BUILD( STATUS_CLASSIC_INTERNAL_ERROR, EINTR ), + STATUS_INVALID_ADDRESS = + STATUS_BUILD( STATUS_CLASSIC_INVALID_ADDRESS, EFAULT ), + STATUS_INVALID_ID = + STATUS_BUILD( STATUS_CLASSIC_INVALID_ID, EINVAL ), + STATUS_INVALID_NODE = + STATUS_BUILD( STATUS_CLASSIC_INVALID_NODE, EINVAL ), + STATUS_INVALID_NAME = + STATUS_BUILD( STATUS_CLASSIC_INVALID_NAME, EINVAL ), STATUS_INVALID_NUMBER = STATUS_BUILD( STATUS_CLASSIC_INVALID_NUMBER, EINVAL ), STATUS_INVALID_PRIORITY = |