[PATCH v2 1/2] score: Rename _Thread_Get_objects_information()

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jan 29 18:01:20 UTC 2021


Rename _Thread_Get_objects_information() in
_Thread_Get_objects_information_by_id() to emphasize that this thread
method uses an object identifier and not a thread control.
---
 cpukit/include/rtems/score/objectdata.h |  6 +++---
 cpukit/include/rtems/score/threadimpl.h | 14 +++++++++-----
 cpukit/include/rtems/score/threadmp.h   |  2 +-
 cpukit/score/src/threadget.c            |  2 +-
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/cpukit/include/rtems/score/objectdata.h b/cpukit/include/rtems/score/objectdata.h
index 952c150e1f..149498df9c 100644
--- a/cpukit/include/rtems/score/objectdata.h
+++ b/cpukit/include/rtems/score/objectdata.h
@@ -55,7 +55,7 @@ typedef struct {
 typedef enum {
   OBJECTS_INTERNAL_NO_CLASS = 0,
 
-  /* Must be one, see __Thread_Get_objects_information() */
+  /* Must be one, see _Thread_Get_objects_information_by_id() */
   OBJECTS_INTERNAL_THREADS = 1
 } Objects_Internal_API;
 
@@ -66,7 +66,7 @@ typedef enum {
 typedef enum {
   OBJECTS_CLASSIC_NO_CLASS = 0,
 
-  /* Must be one, see __Thread_Get_objects_information() */
+  /* Must be one, see _Thread_Get_objects_information_by_id() */
   OBJECTS_RTEMS_TASKS = 1,
 
   OBJECTS_RTEMS_TIMERS,
@@ -87,7 +87,7 @@ typedef enum {
 typedef enum {
   OBJECTS_POSIX_NO_CLASS = 0,
 
-  /* Must be one, see __Thread_Get_objects_information() */
+  /* Must be one, see _Thread_Get_objects_information_by_id() */
   OBJECTS_POSIX_THREADS = 1,
 
   OBJECTS_POSIX_KEYS,
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h
index 52945b407c..d5381c9871 100644
--- a/cpukit/include/rtems/score/threadimpl.h
+++ b/cpukit/include/rtems/score/threadimpl.h
@@ -814,14 +814,18 @@ RTEMS_INLINE_ROUTINE Priority_Control _Thread_Priority_highest(
 }
 
 /**
- * @brief Gets object information for the object id.
+ * @brief Gets the thread object information for the API of the object
+ *   identifier.
  *
- * @param id The id of the object information.
+ * @param id is an object identifier which defines the API to get the
+ *   associated thread objects information.
  *
- * @retval pointer The object information for this id.
- * @retval NULL The object id is not valid.
+ * @retval NULL The object identifier had an invalid API.
+ *
+ * @return Returns the thread object information associated with the API of the
+ *   object identifier.
  */
-RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information(
+RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information_by_id(
   Objects_Id id
 )
 {
diff --git a/cpukit/include/rtems/score/threadmp.h b/cpukit/include/rtems/score/threadmp.h
index ae973ef0d8..6cc68e6320 100644
--- a/cpukit/include/rtems/score/threadmp.h
+++ b/cpukit/include/rtems/score/threadmp.h
@@ -117,7 +117,7 @@ RTEMS_INLINE_ROUTINE bool _Thread_MP_Is_remote( Objects_Id id )
 {
   Objects_Information *information;
 
-  information = _Thread_Get_objects_information( id );
+  information = _Thread_Get_objects_information_by_id( id );
   if ( information == NULL ) {
     return false;
   }
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
index d596cd5ac4..255f94c569 100644
--- a/cpukit/score/src/threadget.c
+++ b/cpukit/score/src/threadget.c
@@ -34,7 +34,7 @@ Thread_Control *_Thread_Get(
     return _Thread_Executing;
   }
 
-  information = _Thread_Get_objects_information( id );
+  information = _Thread_Get_objects_information_by_id( id );
   if ( information == NULL ) {
     return NULL;
   }
-- 
2.26.2



More information about the devel mailing list