diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-10-26 19:44:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-10-26 19:44:10 +0000 |
commit | 78dabb697cef81e6b77826c940d559fa49026a6d (patch) | |
tree | cabd3e3ee30209b1e48cb788ecb4f05441477c26 /cpukit/score/include/rtems/score/thread.h | |
parent | 2007-10-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-78dabb697cef81e6b77826c940d559fa49026a6d.tar.bz2 |
2007-10-26 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/Makefile.am, score/include/rtems/score/thread.h,
score/inline/rtems/score/thread.inl: No longer inline _Thread_Get. It
resulted in unnessary code explosion, many uncovered paths when
looking at binary executable coverage, and only optimized getting
self. Id translations were still getting pushed to a subroutine call
to _Objects_Get. Later the non-inlined version can be further
optimized to get Ids in range for the current API, then self, then
look at other APIs.
* score/src/threadget.c: New file.
Diffstat (limited to 'cpukit/score/include/rtems/score/thread.h')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 1d8ba50705..53d3f54a4a 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -756,6 +756,27 @@ void rtems_iterate_over_all_threads( rtems_per_thread_routine routine ); +/** + * 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 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. + * + * @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 +); + #ifndef __RTEMS_APPLICATION__ #include <rtems/score/thread.inl> #endif |