Changeset b30ab25 in rtems


Ignore:
Timestamp:
May 3, 2016, 2:16:08 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
bb2ad039
Parents:
a0dee7c
git-author:
Sebastian Huber <sebastian.huber@…> (05/03/16 14:16:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/04/16 05:55:26)
Message:

mpci: Avoid Giant lock in _MPCI_Process_response()

Update #2555.
Update #2703.

File:
1 edited

Legend:

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

    ra0dee7c rb30ab25  
    291291)
    292292{
    293   Thread_Control    *the_thread;
    294   Objects_Locations  location;
    295 
    296   the_thread = _Thread_Get( the_packet->id, &location );
    297   switch ( location ) {
    298     case OBJECTS_ERROR:
    299 #if defined(RTEMS_MULTIPROCESSING)
    300     case OBJECTS_REMOTE:
    301 #endif
    302       the_thread = NULL;          /* IMPOSSIBLE */
    303       break;
    304     case OBJECTS_LOCAL:
    305       _Thread_queue_Extract( the_thread );
    306       the_thread->Wait.return_code = the_packet->return_code;
    307       _Objects_Put_without_thread_dispatch( &the_thread->Object );
    308     break;
    309   }
    310 
     293  ISR_lock_Context  lock_context;
     294  Thread_Control   *the_thread;
     295
     296  the_thread = _Thread_Get_interrupt_disable( the_packet->id, &lock_context );
     297  _Assert( the_thread != NULL );
     298
     299  /*
     300   * FIXME: This is broken on SMP, see https://devel.rtems.org/ticket/2703.
     301   *
     302   * Should use _Thread_queue_Extract_critical() instead with a handler
     303   * function provided by the caller of _MPCI_Process_response().  Similar to
     304   * the filter function in _Thread_queue_Flush_critical().
     305   */
     306  _ISR_lock_ISR_enable( &lock_context );
     307  _Thread_queue_Extract( the_thread );
     308  the_thread->Wait.return_code = the_packet->return_code;
    311309  return the_thread;
    312310}
Note: See TracChangeset for help on using the changeset viewer.