Changeset 7d573e9 in rtems


Ignore:
Timestamp:
Nov 7, 2001, 10:51:28 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
410b18c1
Parents:
e7585ed5
Message:

2001-11-07 Joel Sherrill <joel@…>

  • include/rtems/score/object.h: Added prototype for _Objects_Get_by_index().
  • src/objectget.c: Corrected procedure for getting index from Id so it is correct and optimal for both single and multiprocessor configurations.
Location:
c/src/exec/score
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/include/rtems/score/object.h

    re7585ed5 r7d573e9  
    444444);
    445445
     446Objects_Control *_Objects_Get_by_index (
     447  Objects_Information *information,
     448  Objects_Id           id,
     449  Objects_Locations   *location
     450);
     451
    446452/*
    447453 *  _Objects_Get_next
  • c/src/exec/score/src/objectget.c

    re7585ed5 r7d573e9  
    5454  unsigned32       index;
    5555
    56   index = _Objects_Get_index( id );
     56#if defined(RTEMS_MULTIPROCESSING)
     57  index = id - information->minimum_id + 1;
     58#else
     59  /* index = _Objects_Get_index( id ); */
     60  index = id & 0x0000ffff;
     61  /* This should work but doesn't always :( */
     62  /* index = (unsigned16) id; */
     63#endif
    5764
    5865  if ( information->maximum >= index ) {
    5966    _Thread_Disable_dispatch();
    60     if ( (the_object = _Objects_Get_local_object( information, index )) != NULL ) {
     67    if ( (the_object = information->local_table[ index ]) != NULL ) {
    6168      *location = OBJECTS_LOCAL;
    6269      return( the_object );
     
    6875  *location = OBJECTS_ERROR;
    6976#if defined(RTEMS_MULTIPROCESSING)
    70   _Objects_MP_Is_remote(
    71     information,
    72     _Objects_Build_id( information->the_class, _Objects_Local_node, index ),
    73     location,
    74     &the_object
    75   );
     77  _Objects_MP_Is_remote( information, id, location, &the_object );
    7678  return the_object;
    7779#else
Note: See TracChangeset for help on using the changeset viewer.