Changeset cc18d7b in rtems for cpukit/rtems/src/msgqbroadcast.c


Ignore:
Timestamp:
Apr 30, 2015, 11:12:54 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
e76c517
Parents:
c654b525
git-author:
Sebastian Huber <sebastian.huber@…> (04/30/15 11:12:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/19/15 10:00:46)
Message:

score: Fine grained locking for message queues

Aggregate several critical sections into a bigger one. Sending and
receiving messages is now protected by an ISR lock. Thread dispatching
is only disabled in case a blocking operation is necessary. The message
copy procedure is done inside the critical section (interrupts
disabled). Thus this change may have a negative impact on the interrupt
latency in case very large messages are transferred.

Update #2273.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/msgqbroadcast.c

    rc654b525 rcc18d7b  
    4141  Objects_Locations               location;
    4242  CORE_message_queue_Status       core_status;
     43  ISR_lock_Context                lock_context;
    4344
    4445  if ( !buffer )
     
    4849    return RTEMS_INVALID_ADDRESS;
    4950
    50   the_message_queue = _Message_queue_Get( id, &location );
     51  the_message_queue = _Message_queue_Get_interrupt_disable(
     52    id,
     53    &location,
     54    &lock_context
     55  );
    5156  switch ( location ) {
    5257
     
    6267                        NULL,
    6368                      #endif
    64                       count
     69                      count,
     70                      &lock_context
    6571                    );
    66 
    67       _Objects_Put( &the_message_queue->Object );
    6872      return
    6973        _Message_queue_Translate_core_message_queue_return_code( core_status );
Note: See TracChangeset for help on using the changeset viewer.