Changeset b2c491a0 in rtems for cpukit/rtems/macros/rtems


Ignore:
Timestamp:
08/22/95 14:52:08 (28 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.