Changeset 78dabb69 in rtems
- Timestamp:
- 10/26/07 19:44:10 (15 years ago)
- Branches:
- 4.10, 4.11, 4.9, 5, master
- Children:
- 0e87deaa
- Parents:
- 327b0020
- Location:
- cpukit
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
r327b0020 r78dabb69 1 2007-10-26 Joel Sherrill <joel.sherrill@OARcorp.com> 2 3 * score/Makefile.am, score/include/rtems/score/thread.h, 4 score/inline/rtems/score/thread.inl: No longer inline _Thread_Get. It 5 resulted in unnessary code explosion, many uncovered paths when 6 looking at binary executable coverage, and only optimized getting 7 self. Id translations were still getting pushed to a subroutine call 8 to _Objects_Get. Later the non-inlined version can be further 9 optimized to get Ids in range for the current API, then self, then 10 look at other APIs. 11 * score/src/threadget.c: New file. 12 1 13 2007-10-26 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> 2 14 -
cpukit/score/Makefile.am
r327b0020 r78dabb69 127 127 src/threadclearstate.c src/threadclose.c src/threadcreateidle.c \ 128 128 src/threaddelayended.c src/threaddispatch.c src/threadevaluatemode.c \ 129 src/thread handler.c src/threadidlebody.c \129 src/threadget.c src/threadhandler.c src/threadidlebody.c \ 130 130 src/threadinitialize.c src/threadloadenv.c src/threadready.c \ 131 131 src/threadresettimeslice.c src/threadreset.c src/threadrestart.c \ -
cpukit/score/include/rtems/score/thread.h
r327b0020 r78dabb69 757 757 ); 758 758 759 /** 760 * This function maps thread IDs to thread control 761 * blocks. If ID corresponds to a local thread, then it 762 * returns the_thread control pointer which maps to ID 763 * and location is set to OBJECTS_LOCAL. If the thread ID is 764 * global and resides on a remote node, then location is set 765 * to OBJECTS_REMOTE, and the_thread is undefined. 766 * Otherwise, location is set to OBJECTS_ERROR and 767 * the_thread is undefined. 768 * 769 * @note The performance of many RTEMS services depends upon 770 * the quick execution of the "good object" path in this 771 * routine. If there is a possibility of saving a few 772 * cycles off the execution time, this routine is worth 773 * further optimization attention. 774 */ 775 Thread_Control *_Thread_Get ( 776 Objects_Id id, 777 Objects_Locations *location 778 ); 779 759 780 #ifndef __RTEMS_APPLICATION__ 760 781 #include <rtems/score/thread.inl> -
cpukit/score/inline/rtems/score/thread.inl
r327b0020 r78dabb69 255 255 } 256 256 257 /**258 * This function maps thread IDs to thread control259 * blocks. If ID corresponds to a local thread, then it260 * returns the_thread control pointer which maps to ID261 * and location is set to OBJECTS_LOCAL. If the thread ID is262 * global and resides on a remote node, then location is set263 * to OBJECTS_REMOTE, and the_thread is undefined.264 * Otherwise, location is set to OBJECTS_ERROR and265 * the_thread is undefined.266 *267 * @note The performance of many RTEMS services depends upon268 * the quick execution of the "good object" path in this269 * routine. If there is a possibility of saving a few270 * cycles off the execution time, this routine is worth271 * further optimization attention.272 */273 274 RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get (275 Objects_Id id,276 Objects_Locations *location277 )278 {279 uint32_t the_api;280 uint32_t the_class;281 Objects_Information *information;282 Thread_Control *tp = (Thread_Control *) 0;283 284 if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {285 _Thread_Disable_dispatch();286 *location = OBJECTS_LOCAL;287 tp = _Thread_Executing;288 goto done;289 }290 291 the_api = _Objects_Get_API( id );292 if ( the_api && the_api > OBJECTS_APIS_LAST ) {293 *location = OBJECTS_ERROR;294 goto done;295 }296 297 the_class = _Objects_Get_class( id );298 if ( the_class != 1 ) { /* threads are always first class :) */299 *location = OBJECTS_ERROR;300 goto done;301 }302 303 information = _Objects_Information_table[ the_api ][ the_class ];304 305 if ( !information ) {306 *location = OBJECTS_ERROR;307 goto done;308 }309 310 tp = (Thread_Control *) _Objects_Get( information, id, location );311 312 done:313 return tp;314 }315 316 317 257 /** @brief _Thread_Is_proxy_blocking 318 258 *
Note: See TracChangeset
for help on using the changeset viewer.