score: Inline _Objects_Namespace_remove_u32()

This function is simple enough to be inlined.

Update #3835.
This commit is contained in:
Sebastian Huber
2019-12-16 15:10:05 +01:00
parent 6135747989
commit 8e118f2275
2 changed files with 21 additions and 26 deletions

View File

@@ -394,6 +394,21 @@ Objects_Information *_Objects_Get_information_id(
Objects_Id id
);
/**
* @brief Returns if the object has a string name.
*
* @param information The object information table.
*
* @retval true The object has a string name.
* @retval false The object does not have a string name.
*/
RTEMS_INLINE_ROUTINE bool _Objects_Has_string_name(
const Objects_Information *information
)
{
return information->name_length > 0;
}
/**
* @brief Gets object name in the form of a C string.
*
@@ -461,10 +476,14 @@ bool _Objects_Set_name(
* @param information The corresponding object information table.
* @param[out] the_object The object to operate upon.
*/
void _Objects_Namespace_remove_u32(
RTEMS_INLINE_ROUTINE void _Objects_Namespace_remove_u32(
const Objects_Information *information,
Objects_Control *the_object
);
)
{
_Assert( !_Objects_Has_string_name( information ) );
the_object->name.name_u32 = 0;
}
/**
* @brief Removes object with a string name from its namespace.
@@ -502,21 +521,6 @@ Objects_Maximum _Objects_Active_count(
const Objects_Information *information
);
/**
* @brief Returns if the object has a string name.
*
* @param information The object information table.
*
* @retval true The object has a string name.
* @retval false The object does not have a string name.
*/
RTEMS_INLINE_ROUTINE bool _Objects_Has_string_name(
const Objects_Information *information
)
{
return information->name_length > 0;
}
/**
* @brief Returns the object's objects per block.
*

View File

@@ -22,15 +22,6 @@
#include <rtems/score/objectimpl.h>
#include <rtems/score/wkspace.h>
void _Objects_Namespace_remove_u32(
const Objects_Information *information,
Objects_Control *the_object
)
{
_Assert( !_Objects_Has_string_name( information ) );
the_object->name.name_u32 = 0;
}
void _Objects_Namespace_remove_string(
const Objects_Information *information,
Objects_Control *the_object