[PATCH 24/32] score: Delete unused _Thread_Get()

Sebastian Huber sebastian.huber at embedded-brains.de
Wed May 18 09:20:43 UTC 2016


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 77a5059..a33b115 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
-- 
1.8.4.5




More information about the devel mailing list