Changeset 19e855d7 in rtems


Ignore:
Timestamp:
Mar 18, 2016, 2:33:13 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
be88976
Parents:
5a5fb3b
git-author:
Sebastian Huber <sebastian.huber@…> (03/18/16 14:33:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/18/16 14:36:58)
Message:

mpci: Avoid Giant lock

Update #2555.

File:
1 edited

Legend:

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

    r5a5fb3b r19e855d7  
    238238)
    239239{
    240   Thread_Control *executing = _Thread_Executing;
    241 
    242   the_packet->source_tid      = executing->Object.id;
    243   the_packet->source_priority = executing->current_priority;
    244   the_packet->to_convert =
    245      ( the_packet->to_convert - sizeof(MP_packet_Prefix) ) / sizeof(uint32_t);
    246 
    247   executing->Wait.id = the_packet->id;
    248 
    249   _Thread_Disable_dispatch();
     240  Per_CPU_Control *cpu_self;
     241  Thread_Control  *executing;
     242
     243  cpu_self = _Thread_Dispatch_disable();
     244
     245    executing = _Per_CPU_Get_executing( cpu_self );
     246
     247    the_packet->source_tid      = executing->Object.id;
     248    the_packet->source_priority = executing->current_priority;
     249    the_packet->to_convert =
     250       ( the_packet->to_convert - sizeof(MP_packet_Prefix) ) / sizeof(uint32_t);
     251
     252    executing->Wait.id = the_packet->id;
    250253
    251254    (*_MPCI_table->send_packet)( destination, the_packet );
     
    266269    );
    267270
    268   _Thread_Enable_dispatch();
     271  _Thread_Dispatch_enable( cpu_self );
    269272
    270273  return executing->Wait.return_code;
Note: See TracChangeset for help on using the changeset viewer.