Changeset be88976 in rtems


Ignore:
Timestamp:
Mar 18, 2016, 2:35:47 PM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
610e87d
Parents:
19e855d7
git-author:
Sebastian Huber <sebastian.huber@…> (03/18/16 14:35:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/18/16 14:36:58)
Message:

mpci: Avoid Giant lock

The object creation/deletion is protected by the object allocator lock.

Update #2555.

File:
1 edited

Legend:

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

    r19e855d7 rbe88976  
    9292  the_global_object->name      = the_name;
    9393
    94   _Chain_Prepend(
     94  _Assert( _Objects_Allocator_is_owner() );
     95
     96  _Chain_Prepend_unprotected(
    9597    &information->global_table[ _Objects_Get_node( the_id ) ],
    9698    &the_global_object->Object.Node
     
    136138  Objects_MP_Control *the_object;
    137139
     140  _Assert( _Objects_Allocator_is_owner() );
     141
    138142  the_chain = &information->global_table[ _Objects_Get_node( the_id ) ];
    139143
     
    146150    if ( _Objects_Are_ids_equal( the_object->Object.id, the_id ) ) {
    147151
    148       _Chain_Extract( the_node );
     152      _Chain_Extract_unprotected( the_node );
    149153      _Objects_MP_Free_global_object( the_object );
    150154      return;
     
    192196  }
    193197
    194   _Thread_Disable_dispatch();
     198  _Objects_Allocator_lock();
    195199
    196200  for ( node_index = low_node ; node_index <= high_node ; node_index++ ) {
     
    212216        if ( the_object->name == name_to_use ) {
    213217          *the_id = the_object->Object.id;
    214           _Thread_Enable_dispatch();
     218          _Objects_Allocator_unlock();
    215219          return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
    216220        }
     
    219223  }
    220224
    221   _Thread_Enable_dispatch();
     225  _Objects_Allocator_unlock();
    222226  return OBJECTS_INVALID_NAME;
    223227}
     
    255259  }
    256260
    257   _Thread_Disable_dispatch();
     261  _Objects_Allocator_lock();
    258262
    259263  the_chain = &information->global_table[ node ];
     
    273277  }
    274278
    275   _Thread_Enable_dispatch();
     279  _Objects_Allocator_unlock();
    276280  *location   = OBJECTS_ERROR;
    277281  *the_object = NULL;
Note: See TracChangeset for help on using the changeset viewer.