summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/inline/rtems/rtems
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/inline/rtems/rtems')
-rw-r--r--cpukit/rtems/inline/rtems/rtems/attr.inl13
-rw-r--r--cpukit/rtems/inline/rtems/rtems/message.inl37
2 files changed, 19 insertions, 31 deletions
diff --git a/cpukit/rtems/inline/rtems/rtems/attr.inl b/cpukit/rtems/inline/rtems/rtems/attr.inl
index c657a08211..15a9296b7e 100644
--- a/cpukit/rtems/inline/rtems/rtems/attr.inl
+++ b/cpukit/rtems/inline/rtems/rtems/attr.inl
@@ -84,19 +84,6 @@ STATIC INLINE boolean _Attributes_Is_priority(
/*PAGE
*
- * _Attributes_Is_limit
- *
- */
-
-STATIC INLINE boolean _Attributes_Is_limit(
- rtems_attribute attribute_set
-)
-{
- return ( attribute_set & RTEMS_LIMIT );
-}
-
-/*PAGE
- *
* _Attributes_Is_binary_semaphore
*
*/
diff --git a/cpukit/rtems/inline/rtems/rtems/message.inl b/cpukit/rtems/inline/rtems/rtems/message.inl
index ee8d5f6cb1..18d793d2fe 100644
--- a/cpukit/rtems/inline/rtems/rtems/message.inl
+++ b/cpukit/rtems/inline/rtems/rtems/message.inl
@@ -17,6 +17,8 @@
#ifndef __MESSAGE_QUEUE_inl
#define __MESSAGE_QUEUE_inl
+#include <rtems/wkspace.h>
+
/*PAGE
*
* _Message_queue_Copy_buffer
@@ -24,11 +26,12 @@
*/
STATIC INLINE void _Message_queue_Copy_buffer (
- Message_queue_Buffer *source,
- Message_queue_Buffer *destination
+ void *source,
+ void *destination,
+ unsigned32 size
)
{
- *destination = *source;
+ memcpy(destination, source, size);
}
/*PAGE
@@ -38,10 +41,12 @@ STATIC INLINE void _Message_queue_Copy_buffer (
*/
STATIC INLINE Message_queue_Buffer_control *
- _Message_queue_Allocate_message_buffer ( void )
+_Message_queue_Allocate_message_buffer (
+ Message_queue_Control *the_message_queue
+)
{
return (Message_queue_Buffer_control *)
- _Chain_Get( &_Message_queue_Inactive_messages );
+ _Chain_Get( &the_message_queue->Inactive_messages );
}
/*PAGE
@@ -51,10 +56,11 @@ STATIC INLINE Message_queue_Buffer_control *
*/
STATIC INLINE void _Message_queue_Free_message_buffer (
- Message_queue_Buffer_control *the_message
+ Message_queue_Control *the_message_queue,
+ Message_queue_Buffer_control *the_message
)
{
- _Chain_Append( &_Message_queue_Inactive_messages, &the_message->Node );
+ _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
}
/*PAGE
@@ -116,17 +122,6 @@ STATIC INLINE boolean _Message_queue_Is_null (
return ( the_message_queue == NULL );
}
-/*PAGE
- *
- * _Message_queue_Allocate
- *
- */
-
-STATIC INLINE Message_queue_Control *_Message_queue_Allocate ( void )
-{
- return (Message_queue_Control *)
- _Objects_Allocate( &_Message_queue_Information );
-}
/*PAGE
*
@@ -138,6 +133,12 @@ STATIC INLINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
+ if (the_message_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 );
}