mpci: Simplify _Objects_MP_Is_remote()

This commit is contained in:
Sebastian Huber
2016-05-20 16:16:59 +02:00
parent 0cc60718d0
commit 956b8e5047
4 changed files with 20 additions and 22 deletions
+10 -10
View File
@@ -144,19 +144,19 @@ Objects_Name_or_id_lookup_errors _Objects_MP_Global_name_search (
);
/**
* @brief Searches the Global Object Table managed
* by information for the object indicated by ID.
* @brief Returns true, if the object identifier is in the global object
* identifier cache of the specified object information, otherwise false.
*
* @param[in] information points to the object information table for this
* object class.
* @param[in] the_id is the Id of the object being opened.
* @param id The object identifier.
* @param information The object information.
*
* @retval OBJECTS_REMOTE A remote objects with this object identifier exits.
* @retval OBJECTS_ERROR Otherwise.
* @retval true A remote objects with this object identifier exits in the
* global object identifier cache of the specified information.
* @retval false Otherwise.
*/
Objects_Locations _Objects_MP_Is_remote(
Objects_Information *information,
Objects_Id the_id
bool _Objects_MP_Is_remote(
Objects_Id id,
const Objects_Information *information
);
/**
+1 -1
View File
@@ -100,7 +100,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_MP_Is_remote( Objects_Id id )
return false;
}
return _Objects_MP_Is_remote( information, id ) == OBJECTS_REMOTE;
return _Objects_MP_Is_remote( id, information );
}
/**@}*/
+5 -3
View File
@@ -43,10 +43,12 @@ Objects_Control *_Objects_Get_isr_disable(
return NULL;
}
#if defined(RTEMS_MULTIPROCESSING)
*location = _Objects_MP_Is_remote( information, id );
#else
*location = OBJECTS_ERROR;
#if defined(RTEMS_MULTIPROCESSING)
if ( _Objects_MP_Is_remote( id, information ) ) {
*location = OBJECTS_REMOTE;
}
#endif
return NULL;
+4 -8
View File
@@ -351,9 +351,9 @@ Objects_Name_or_id_lookup_errors _Objects_MP_Global_name_search(
return status;
}
Objects_Locations _Objects_MP_Is_remote(
Objects_Information *information,
Objects_Id the_id
bool _Objects_MP_Is_remote(
Objects_Id the_id,
const Objects_Information *information
)
{
Objects_MP_Control *the_global_object;
@@ -371,11 +371,7 @@ Objects_Locations _Objects_MP_Is_remote(
_Objects_MP_Global_release( &lock_context );
if ( the_global_object != NULL ) {
return OBJECTS_REMOTE;
} else {
return OBJECTS_ERROR;
}
return the_global_object != NULL;
}
Objects_MP_Control *_Objects_MP_Allocate_global_object( void )