Changeset 5250ff39 in rtems for c/src/exec/score/inline
- Timestamp:
- 08/23/95 21:06:31 (27 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 7f6a24ab
- Parents:
- 3235ad9
- Location:
- c/src/exec/score/inline
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/score/inline/rtems/score/thread.inl
r3235ad9 r5250ff39 232 232 * _Thread_Get 233 233 * 234 * NOTE: XXX... This routine may be able to be optimized. 234 235 */ 235 236 … … 239 240 ) 240 241 { 242 Objects_Classes the_class; 243 Objects_Information *information; 244 241 245 if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 242 243 244 246 _Thread_Disable_dispatch(); 247 *location = OBJECTS_LOCAL; 248 return( _Thread_Executing ); 245 249 } 246 247 return (Thread_Control *) 248 _Objects_Get( &_Thread_Information, id, location ); 250 251 the_class = rtems_get_class( id ); 252 253 if ( the_class > OBJECTS_CLASSES_LAST ) { 254 *location = OBJECTS_ERROR; 255 return (Thread_Control *) 0; 256 } 257 258 information = _Objects_Information_table[ the_class ]; 259 260 if ( !information || !information->is_thread ) { 261 *location = OBJECTS_ERROR; 262 return (Thread_Control *) 0; 263 } 264 265 return (Thread_Control *) _Objects_Get( information, id, location ); 249 266 } 250 267 -
c/src/exec/score/inline/thread.inl
r3235ad9 r5250ff39 232 232 * _Thread_Get 233 233 * 234 * NOTE: XXX... This routine may be able to be optimized. 234 235 */ 235 236 … … 239 240 ) 240 241 { 242 Objects_Classes the_class; 243 Objects_Information *information; 244 241 245 if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 242 243 244 246 _Thread_Disable_dispatch(); 247 *location = OBJECTS_LOCAL; 248 return( _Thread_Executing ); 245 249 } 246 247 return (Thread_Control *) 248 _Objects_Get( &_Thread_Information, id, location ); 250 251 the_class = rtems_get_class( id ); 252 253 if ( the_class > OBJECTS_CLASSES_LAST ) { 254 *location = OBJECTS_ERROR; 255 return (Thread_Control *) 0; 256 } 257 258 information = _Objects_Information_table[ the_class ]; 259 260 if ( !information || !information->is_thread ) { 261 *location = OBJECTS_ERROR; 262 return (Thread_Control *) 0; 263 } 264 265 return (Thread_Control *) _Objects_Get( information, id, location ); 249 266 } 250 267
Note: See TracChangeset
for help on using the changeset viewer.