summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/macros
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-22 14:52:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-08-22 14:52:08 +0000
commitb2c491a08028b7bababe1fe2c09d1f0ac75bdb4f (patch)
tree6cc28038ecc96df113f3bb25ed2fe734da24458c /cpukit/rtems/macros
parentModified object name to id translation loop to make it easier to (diff)
downloadrtems-b2c491a08028b7bababe1fe2c09d1f0ac75bdb4f.tar.bz2
make inline and macro implementations match
Diffstat (limited to 'cpukit/rtems/macros')
-rw-r--r--cpukit/rtems/macros/rtems/rtems/message.inl28
1 files changed, 14 insertions, 14 deletions
diff --git a/cpukit/rtems/macros/rtems/rtems/message.inl b/cpukit/rtems/macros/rtems/rtems/message.inl
index 5415708ac5..ac0b1afb3a 100644
--- a/cpukit/rtems/macros/rtems/rtems/message.inl
+++ b/cpukit/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
*