diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-08-22 14:52:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-08-22 14:52:08 +0000 |
commit | b2c491a08028b7bababe1fe2c09d1f0ac75bdb4f (patch) | |
tree | 6cc28038ecc96df113f3bb25ed2fe734da24458c /c/src/exec/rtems/macros | |
parent | Modified object name to id translation loop to make it easier to (diff) | |
download | rtems-b2c491a08028b7bababe1fe2c09d1f0ac75bdb4f.tar.bz2 |
make inline and macro implementations match
Diffstat (limited to 'c/src/exec/rtems/macros')
-rw-r--r-- | c/src/exec/rtems/macros/message.inl | 28 | ||||
-rw-r--r-- | c/src/exec/rtems/macros/rtems/rtems/message.inl | 28 |
2 files changed, 28 insertions, 28 deletions
diff --git a/c/src/exec/rtems/macros/message.inl b/c/src/exec/rtems/macros/message.inl index 5415708ac5..ac0b1afb3a 100644 --- a/c/src/exec/rtems/macros/message.inl +++ b/c/src/exec/rtems/macros/message.inl @@ -23,8 +23,7 @@ */ #define _Message_queue_Copy_buffer( _source, _destination ) \ - *(Message_queue_Buffer *)(_destination) = \ - *(Message_queue_Buffer *)(_source) + memcpy( _destination, _source, _size) /*PAGE * @@ -86,23 +85,24 @@ /*PAGE * - * _Message_queue_Allocate - * - */ - -#define _Message_queue_Allocate() \ - (Message_queue_Control *) \ - _Objects_Allocate( &_Message_queue_Information ) - -/*PAGE - * * _Message_queue_Free * */ #define _Message_queue_Free( _the_message_queue ) \ - _Objects_Free( &_Message_queue_Information, \ - &(_the_message_queue)->Object ) + do { \ + \ + if ( (_the_messsage_queue)->message_buffers ) { \ + _Workspace_Free((void *) (_the_message_queue)->message_buffers); \ + (_the_message_queue)->message_buffers = 0; \ + } + \ + _Objects_Free( \ + &_Message_queue_Information, \ + &(_the_message_queue)->Object \ + ); \ + } while ( 0 ) + /*PAGE * diff --git a/c/src/exec/rtems/macros/rtems/rtems/message.inl b/c/src/exec/rtems/macros/rtems/rtems/message.inl index 5415708ac5..ac0b1afb3a 100644 --- a/c/src/exec/rtems/macros/rtems/rtems/message.inl +++ b/c/src/exec/rtems/macros/rtems/rtems/message.inl @@ -23,8 +23,7 @@ */ #define _Message_queue_Copy_buffer( _source, _destination ) \ - *(Message_queue_Buffer *)(_destination) = \ - *(Message_queue_Buffer *)(_source) + memcpy( _destination, _source, _size) /*PAGE * @@ -86,23 +85,24 @@ /*PAGE * - * _Message_queue_Allocate - * - */ - -#define _Message_queue_Allocate() \ - (Message_queue_Control *) \ - _Objects_Allocate( &_Message_queue_Information ) - -/*PAGE - * * _Message_queue_Free * */ #define _Message_queue_Free( _the_message_queue ) \ - _Objects_Free( &_Message_queue_Information, \ - &(_the_message_queue)->Object ) + do { \ + \ + if ( (_the_messsage_queue)->message_buffers ) { \ + _Workspace_Free((void *) (_the_message_queue)->message_buffers); \ + (_the_message_queue)->message_buffers = 0; \ + } + \ + _Objects_Free( \ + &_Message_queue_Information, \ + &(_the_message_queue)->Object \ + ); \ + } while ( 0 ) + /*PAGE * |