Changeset 5250ff39 in rtems for cpukit/score/inline


Ignore:
Timestamp:
Aug 23, 1995, 9:06:31 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
7f6a24ab
Parents:
3235ad9
Message:

Moved _Thread_Information -> _RTEMS_tasks_Information.

Added a table of object information control blocks.

Modified _Thread_Get so it looks up a thread regardless of which
thread management "entity" (manager, internal, etc) actually "owns" it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/inline/rtems/score/thread.inl

    r3235ad9 r5250ff39  
    232232 *  _Thread_Get
    233233 *
     234 *  NOTE:  XXX... This routine may be able to be optimized.
    234235 */
    235236
     
    239240)
    240241{
     242  Objects_Classes      the_class;
     243  Objects_Information *information;
     244 
    241245  if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
    242      _Thread_Disable_dispatch();
    243      *location = OBJECTS_LOCAL;
    244      return( _Thread_Executing );
     246    _Thread_Disable_dispatch();
     247    *location = OBJECTS_LOCAL;
     248    return( _Thread_Executing );
    245249  }
    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 );
    249266}
    250267
Note: See TracChangeset for help on using the changeset viewer.