Changeset 27b7e81 in rtems


Ignore:
Timestamp:
Dec 21, 2008, 9:28:05 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
6fee038
Parents:
b7b450ef
Message:

2008-12-21 Joel Sherrill <joel.sherrill@…>

  • score/inline/rtems/score/object.inl, score/src/objectgetbyindex.c: Fix issues when using 16-bit object Ids.
Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rb7b450ef r27b7e81  
     12008-12-21      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * score/inline/rtems/score/object.inl, score/src/objectgetbyindex.c:
     4        Fix issues when using 16-bit object Ids.
     5
    162008-12-19      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • cpukit/score/inline/rtems/score/object.inl

    rb7b450ef r27b7e81  
    4646  return (( (Objects_Id) the_api )   << OBJECTS_API_START_BIT)   |
    4747         (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
    48          (( (Objects_Id) node )      << OBJECTS_NODE_START_BIT)  |
     48         #if !defined(RTEMS_USE_16_BIT_OBJECT)
     49           (( (Objects_Id) node )    << OBJECTS_NODE_START_BIT)  |
     50         #endif
    4951         (( (Objects_Id) index )     << OBJECTS_INDEX_START_BIT);
    5052}
     
    8890)
    8991{
    90   return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
     92  /*
     93   * If using 16-bit Ids, then there is no node field and it MUST
     94   * be a single processor system.
     95   */
     96  #if defined(RTEMS_USE_16_BIT_OBJECT)
     97    return 1;
     98  #else
     99    return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS;
     100  #endif
    91101}
    92102
  • cpukit/score/src/objectgetbyindex.c

    rb7b450ef r27b7e81  
    5151Objects_Control *_Objects_Get_by_index(
    5252  Objects_Information *information,
    53   uint32_t             index,
     53  Objects_Id           id,
    5454  Objects_Locations   *location
    5555)
    5656{
    5757  Objects_Control *the_object;
     58  uint16_t         index;
     59
     60  index = _Objects_Get_index( id );
    5861
    5962  if ( information->maximum >= index ) {
Note: See TracChangeset for help on using the changeset viewer.