Changeset b2c491a0 in rtems for cpukit/rtems


Ignore:
Timestamp:
Aug 22, 1995, 2:52:08 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
bb322a0
Parents:
61361688
Message:

make inline and macro implementations match

Location:
cpukit/rtems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/inline/rtems/rtems/message.inl

    r61361688 rb2c491a0  
    134134)
    135135{
    136   if (the_message_queue->message_buffers)
    137   {
    138       _Workspace_Free((void *) the_message_queue->message_buffers);
    139       the_message_queue->message_buffers = 0;
     136  if (the_message_queue->message_buffers) {
     137    _Workspace_Free((void *) the_message_queue->message_buffers);
     138    the_message_queue->message_buffers = 0;
    140139  }
    141140 
  • cpukit/rtems/macros/rtems/rtems/message.inl

    r61361688 rb2c491a0  
    2424
    2525#define _Message_queue_Copy_buffer( _source, _destination ) \
    26   *(Message_queue_Buffer *)(_destination) = \
    27         *(Message_queue_Buffer *)(_source)
     26  memcpy( _destination, _source, _size)
    2827
    2928/*PAGE
     
    8786/*PAGE
    8887 *
    89  *  _Message_queue_Allocate
    90  *
    91  */
    92 
    93 #define _Message_queue_Allocate() \
    94   (Message_queue_Control *) \
    95       _Objects_Allocate( &_Message_queue_Information )
    96 
    97 /*PAGE
    98  *
    9988 *  _Message_queue_Free
    10089 *
     
    10291
    10392#define _Message_queue_Free( _the_message_queue ) \
    104   _Objects_Free( &_Message_queue_Information, \
    105                  &(_the_message_queue)->Object )
     93  do { \
     94    \
     95    if ( (_the_messsage_queue)->message_buffers ) { \
     96      _Workspace_Free((void *) (_the_message_queue)->message_buffers); \
     97      (_the_message_queue)->message_buffers = 0; \
     98    }
     99    \
     100    _Objects_Free( \
     101      &_Message_queue_Information, \
     102      &(_the_message_queue)->Object \
     103    ); \
     104  } while ( 0 )
     105
    106106
    107107/*PAGE
Note: See TracChangeset for help on using the changeset viewer.