From 089e68181e70aa96802f8ebe0acf6af73c02f5ae Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 6 Apr 2021 16:00:35 +0200 Subject: 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. --- cpukit/score/src/objectidtoname.c | 10 +++++----- cpukit/score/src/objectmp.c | 14 +++++++------- cpukit/score/src/objectnametoid.c | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'cpukit/score') diff --git a/cpukit/score/src/objectidtoname.c b/cpukit/score/src/objectidtoname.c index a959636870..f35f59f8d1 100644 --- a/cpukit/score/src/objectidtoname.c +++ b/cpukit/score/src/objectidtoname.c @@ -22,7 +22,7 @@ #include -Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( +Status_Control _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) @@ -40,10 +40,10 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( information = _Objects_Get_information_id( tmpId ); if ( !information ) - return OBJECTS_INVALID_ID; + return STATUS_INVALID_ID; if ( _Objects_Has_string_name( information ) ) - return OBJECTS_INVALID_ID; + return STATUS_INVALID_ID; the_object = _Objects_Get( tmpId, @@ -51,9 +51,9 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( information ); if ( !the_object ) - return OBJECTS_INVALID_ID; + return STATUS_INVALID_ID; *name = the_object->name; _ISR_lock_ISR_enable( &lock_context ); - return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; + return STATUS_SUCCESSFUL; } diff --git a/cpukit/score/src/objectmp.c b/cpukit/score/src/objectmp.c index b44ef65e94..05b286e067 100644 --- a/cpukit/score/src/objectmp.c +++ b/cpukit/score/src/objectmp.c @@ -293,19 +293,19 @@ void _Objects_MP_Close ( } } -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, Objects_Id *the_id ) { - Objects_Name_or_id_lookup_errors status; - Objects_MP_Control *the_global_object; - ISR_lock_Context lock_context; + Status_Control status; + Objects_MP_Control *the_global_object; + ISR_lock_Context lock_context; if ( nodes_to_search > _Objects_Maximum_nodes ) { - return OBJECTS_INVALID_NODE; + return STATUS_INVALID_NODE; } _Objects_MP_Global_acquire( &lock_context ); @@ -336,9 +336,9 @@ Objects_Name_or_id_lookup_errors _Objects_MP_Global_name_search( if ( the_global_object != NULL ) { *the_id = the_global_object->id; _Assert( the_global_object->name.name_u32 != 0 ); - status = OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; + status = STATUS_SUCCESSFUL; } else { - status = OBJECTS_INVALID_NAME; + status = STATUS_INVALID_NAME; } _Objects_MP_Global_release( &lock_context ); diff --git a/cpukit/score/src/objectnametoid.c b/cpukit/score/src/objectnametoid.c index c70410d955..063cf36398 100644 --- a/cpukit/score/src/objectnametoid.c +++ b/cpukit/score/src/objectnametoid.c @@ -27,7 +27,7 @@ static bool _Objects_Is_local_node_search( uint32_t node ) return node == OBJECTS_SEARCH_LOCAL_NODE || _Objects_Is_local_node( node ); } -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, @@ -41,7 +41,7 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32( _Assert( !_Objects_Has_string_name( information ) ); if ( id == NULL ) { - return OBJECTS_INVALID_ADDRESS; + return STATUS_INVALID_ADDRESS; } if ( @@ -61,19 +61,19 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32( if ( the_object != NULL && name == the_object->name.name_u32 ) { *id = the_object->id; _Assert( name != 0 ); - return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; + return STATUS_SUCCESSFUL; } } } #if defined(RTEMS_MULTIPROCESSING) if ( _Objects_Is_local_node_search( node ) ) { - return OBJECTS_INVALID_NAME; + return STATUS_INVALID_NAME; } name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else - return OBJECTS_INVALID_NAME; + return STATUS_INVALID_NAME; #endif } -- cgit v1.2.3