Changeset 8c77150 in rtems


Ignore:
Timestamp:
May 3, 2016, 7:24:32 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
822ec58
Parents:
876dde7a
git-author:
Sebastian Huber <sebastian.huber@…> (05/03/16 07:24:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/04/16 05:24:30)
Message:

score: Simplify _Thread_Get_objects_information()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadget.c

    r876dde7a r8c77150  
    2626)
    2727{
    28   uint32_t             the_api;
    29   uint32_t             the_class;
     28  uint32_t the_api;
    3029
    3130  the_api = _Objects_Get_API( id );
     31
    3232  if ( !_Objects_Is_api_valid( the_api ) ) {
    3333    return NULL;
    3434  }
    3535
    36   the_class = _Objects_Get_class( id );
    37   if ( the_class != 1 ) {       /* threads are always first class :) */
    38     return NULL;
    39   }
    40 
    41   return _Objects_Information_table[ the_api ][ the_class ];
     36  /*
     37   * Threads are always first class :)
     38   *
     39   * There is no need to validate the object class of the object identifier,
     40   * since this will be done by the object get methods.
     41   */
     42  return _Objects_Information_table[ the_api ][ 1 ];
    4243}
    4344
Note: See TracChangeset for help on using the changeset viewer.