summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-16 15:10:05 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-12 09:08:40 +0100
commit8e118f2275bf1093b0ed3c66a7bd7535fd61b29e (patch)
treedb32da7cbb96872892f70f88d21e17e61096e311
parent61357479894b08c9017ba39f90572c57dc307869 (diff)
score: Inline _Objects_Namespace_remove_u32()
This function is simple enough to be inlined. Update #3835.
-rw-r--r--cpukit/include/rtems/score/objectimpl.h38
-rw-r--r--cpukit/score/src/objectnamespaceremove.c9
2 files changed, 21 insertions, 26 deletions
diff --git a/cpukit/include/rtems/score/objectimpl.h b/cpukit/include/rtems/score/objectimpl.h
index c683e6b800..87d29cb087 100644
--- a/cpukit/include/rtems/score/objectimpl.h
+++ b/cpukit/include/rtems/score/objectimpl.h
@@ -395,6 +395,21 @@ Objects_Information *_Objects_Get_information_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.
*
* This method gets the name of an object and returns its name
@@ -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.
@@ -503,21 +522,6 @@ Objects_Maximum _Objects_Active_count(
);
/**
- * @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.
*
* @param information The object information table.
diff --git a/cpukit/score/src/objectnamespaceremove.c b/cpukit/score/src/objectnamespaceremove.c
index 32603119de..544c11dbd6 100644
--- a/cpukit/score/src/objectnamespaceremove.c
+++ b/cpukit/score/src/objectnamespaceremove.c
@@ -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