[rtems commit] score: Delete unused _Thread_Get()

Sebastian Huber sebh at rtems.org
Fri May 20 06:00:23 UTC 2016


Module:    rtems
Branch:    master
Commit:    23294fd2255031eefe708075064f58bf54d43279
Changeset: http://git.rtems.org/rtems/commit/?id=23294fd2255031eefe708075064f58bf54d43279

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue May 17 16:07:11 2016 +0200

score: Delete unused _Thread_Get()

Update #2555.

---

 cpukit/score/include/rtems/score/threadimpl.h | 26 --------------------------
 cpukit/score/src/threadget.c                  | 22 ----------------------
 2 files changed, 48 deletions(-)

diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 549ca7a..ad87c1d 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -578,32 +578,6 @@ RTEMS_INLINE_ROUTINE Objects_Information *_Thread_Get_objects_information(
 }
 
 /**
- *  @brief Maps thread Id to a TCB pointer.
- *
- *  This function maps thread IDs to thread control
- *  blocks.  If ID corresponds to a local thread, then it
- *  returns the_thread control pointer which maps to ID
- *  and @a location is set to OBJECTS_LOCAL.  If the thread ID is
- *  global and resides on a remote node, then location is set
- *  to OBJECTS_REMOTE, and the_thread is undefined.
- *  Otherwise, location is set to OBJECTS_ERROR and
- *  the_thread is undefined.
- *
- *  @param[in] id is the id of the thread.
- *  @param[in] location is the location of the block.
- *
- *  @note  The performance of many RTEMS services depends upon
- *         the quick execution of the "good object" path in this
- *         routine.  If there is a possibility of saving a few
- *         cycles off the execution time, this routine is worth
- *         further optimization attention.
- */
-Thread_Control *_Thread_Get (
-  Objects_Id         id,
-  Objects_Locations *location
-);
-
-/**
  * @brief Gets a thread by its identifier.
  *
  * @see _Objects_Get_local().
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
index c650499..194b68b 100644
--- a/cpukit/score/src/threadget.c
+++ b/cpukit/score/src/threadget.c
@@ -21,28 +21,6 @@
 
 #include <rtems/score/threadimpl.h>
 
-Thread_Control *_Thread_Get(
-  Objects_Id         id,
-  Objects_Locations *location
-)
-{
-  Objects_Information *information;
-
-  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
-    _Thread_Disable_dispatch();
-    *location = OBJECTS_LOCAL;
-    return _Thread_Executing;
-  }
-
-  information = _Thread_Get_objects_information( id );
-  if ( information == NULL ) {
-    *location = OBJECTS_ERROR;
-    return NULL;
-  }
-
-  return (Thread_Control *) _Objects_Get( information, id, location );
-}
-
 Thread_Control *_Thread_Get_interrupt_disable(
   Objects_Id         id,
   ISR_lock_Context  *lock_context



More information about the vc mailing list