Changeset 47c9c083 in rtems


Ignore:
Timestamp:
May 12, 2015, 8:53:47 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
a0001d6
Parents:
be0366b
Message:

score: Avoid Giant lock in _Objects_Id_to_name()

This prevents a deadlock situation in the capture engine.

File:
1 edited

Legend:

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

    rbe0366b r47c9c083  
    3232  Objects_Control     *the_object = (Objects_Control *) 0;
    3333  Objects_Locations    ignored_location;
     34  ISR_lock_Context     lock_context;
    3435
    3536  /*
     
    5758  #endif
    5859
    59   the_object = _Objects_Get( information, tmpId, &ignored_location );
     60  the_object = _Objects_Get_isr_disable(
     61    information,
     62    tmpId,
     63    &ignored_location,
     64    &lock_context
     65  );
    6066  if ( !the_object )
    6167    return OBJECTS_INVALID_ID;
    6268
    6369  *name = the_object->name;
    64   _Objects_Put( the_object );
     70  _ISR_lock_ISR_enable( &lock_context );
    6571  return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
    6672}
Note: See TracChangeset for help on using the changeset viewer.