Changeset c268766 in rtems


Ignore:
Timestamp:
May 10, 2021, 7:39:35 AM (6 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3af2dc7
Parents:
ab5aeb1
git-author:
Sebastian Huber <sebastian.huber@…> (05/10/21 07:39:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/11/21 05:45:58)
Message:

rtems: Use _Objects_Free_nothing() for msg queues

Use _Objects_Free_nothing() for rtems_message_queue_construct() to avoid
unreachable code in _CORE_message_queue_Close() in case only
user-provided message buffers are used.

Update #4007.

Location:
cpukit
Files:
2 edited

Legend:

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

    rab5aeb1 rc268766  
    4242  }
    4343
    44   the_message_queue->free_message_buffers = config->storage_free;
     44  if ( config->storage_free != NULL ) {
     45    the_message_queue->free_message_buffers = config->storage_free;
     46  } else {
     47    the_message_queue->free_message_buffers = _Objects_Free_nothing;
     48  }
     49
    4550  return config->storage_area;
    4651}
  • cpukit/score/src/coremsgclose.c

    rab5aeb1 rc268766  
    5252  );
    5353
    54   if ( the_message_queue->free_message_buffers != NULL ) {
    55     ( *the_message_queue->free_message_buffers )(
    56       the_message_queue->message_buffers
    57     );
    58   }
     54  ( *the_message_queue->free_message_buffers )(
     55    the_message_queue->message_buffers
     56  );
    5957
    6058  _Thread_queue_Destroy( &the_message_queue->Wait_queue );
Note: See TracChangeset for help on using the changeset viewer.