[PATCH 24/25] score: Create message queue implementation header

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 18 14:26:12 UTC 2013


Move implementation specific parts of coremsg.h and coremsg.inl into new
header file coremsgimpl.h.  The coremsg.h contains now only the
application visible API.
---
 cpukit/posix/include/rtems/posix/mqueueimpl.h  |    1 +
 cpukit/rtems/src/msg.c                         |    2 +-
 cpukit/rtems/src/msgqallocate.c                |    2 +-
 cpukit/rtems/src/msgqbroadcast.c               |    2 +-
 cpukit/rtems/src/msgqcreate.c                  |    2 +-
 cpukit/rtems/src/msgqdelete.c                  |    2 +-
 cpukit/rtems/src/msgqflush.c                   |    2 +-
 cpukit/rtems/src/msgqgetnumberpending.c        |    2 +-
 cpukit/rtems/src/msgqident.c                   |    2 +-
 cpukit/rtems/src/msgqreceive.c                 |    2 +-
 cpukit/rtems/src/msgqsend.c                    |    2 +-
 cpukit/rtems/src/msgqtranslatereturncode.c     |    2 +-
 cpukit/rtems/src/msgqurgent.c                  |    2 +-
 cpukit/score/Makefile.am                       |    2 +-
 cpukit/score/include/rtems/score/coremsg.h     |  340 +--------------
 cpukit/score/include/rtems/score/coremsgimpl.h |  577 ++++++++++++++++++++++++
 cpukit/score/inline/rtems/score/coremsg.inl    |  255 -----------
 cpukit/score/preinstall.am                     |    8 +-
 cpukit/score/src/coremsg.c                     |    2 +-
 cpukit/score/src/coremsgbroadcast.c            |    2 +-
 cpukit/score/src/coremsgclose.c                |    2 +-
 cpukit/score/src/coremsgflush.c                |    2 +-
 cpukit/score/src/coremsgflushsupp.c            |    2 +-
 cpukit/score/src/coremsgflushwait.c            |    2 +-
 cpukit/score/src/coremsginsert.c               |    2 +-
 cpukit/score/src/coremsgseize.c                |    2 +-
 cpukit/score/src/coremsgsubmit.c               |    2 +-
 27 files changed, 614 insertions(+), 611 deletions(-)
 create mode 100644 cpukit/score/include/rtems/score/coremsgimpl.h
 delete mode 100644 cpukit/score/inline/rtems/score/coremsg.inl

diff --git a/cpukit/posix/include/rtems/posix/mqueueimpl.h b/cpukit/posix/include/rtems/posix/mqueueimpl.h
index 0f86e7f..4963c20 100644
--- a/cpukit/posix/include/rtems/posix/mqueueimpl.h
+++ b/cpukit/posix/include/rtems/posix/mqueueimpl.h
@@ -21,6 +21,7 @@
 
 #include <rtems/posix/mqueue.h>
 #include <rtems/posix/posixapi.h>
+#include <rtems/score/coremsgimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
index ed17202..4515d9b 100644
--- a/cpukit/rtems/src/msg.c
+++ b/cpukit/rtems/src/msg.c
@@ -23,7 +23,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqallocate.c b/cpukit/rtems/src/msgqallocate.c
index 9dd03d6..80f99a7 100644
--- a/cpukit/rtems/src/msgqallocate.c
+++ b/cpukit/rtems/src/msgqallocate.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqbroadcast.c b/cpukit/rtems/src/msgqbroadcast.c
index bca22fd..29ba7e0 100644
--- a/cpukit/rtems/src/msgqbroadcast.c
+++ b/cpukit/rtems/src/msgqbroadcast.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c
index 73e5d5c..d1996f1 100644
--- a/cpukit/rtems/src/msgqcreate.c
+++ b/cpukit/rtems/src/msgqcreate.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqdelete.c b/cpukit/rtems/src/msgqdelete.c
index 1ca3d89..3c77975 100644
--- a/cpukit/rtems/src/msgqdelete.c
+++ b/cpukit/rtems/src/msgqdelete.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqflush.c b/cpukit/rtems/src/msgqflush.c
index d26ecb8..5d2bbb3 100644
--- a/cpukit/rtems/src/msgqflush.c
+++ b/cpukit/rtems/src/msgqflush.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqgetnumberpending.c b/cpukit/rtems/src/msgqgetnumberpending.c
index db0f3c5..2d5a56d 100644
--- a/cpukit/rtems/src/msgqgetnumberpending.c
+++ b/cpukit/rtems/src/msgqgetnumberpending.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqident.c b/cpukit/rtems/src/msgqident.c
index b503f6f..1605f53 100644
--- a/cpukit/rtems/src/msgqident.c
+++ b/cpukit/rtems/src/msgqident.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
index a5047bd..265e71e 100644
--- a/cpukit/rtems/src/msgqreceive.c
+++ b/cpukit/rtems/src/msgqreceive.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqsend.c b/cpukit/rtems/src/msgqsend.c
index ec83ddd..7aea3da 100644
--- a/cpukit/rtems/src/msgqsend.c
+++ b/cpukit/rtems/src/msgqsend.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqtranslatereturncode.c b/cpukit/rtems/src/msgqtranslatereturncode.c
index c5d219a..ac58ca4 100644
--- a/cpukit/rtems/src/msgqtranslatereturncode.c
+++ b/cpukit/rtems/src/msgqtranslatereturncode.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/rtems/src/msgqurgent.c b/cpukit/rtems/src/msgqurgent.c
index a573ee9..d8641c3 100644
--- a/cpukit/rtems/src/msgqurgent.c
+++ b/cpukit/rtems/src/msgqurgent.c
@@ -22,7 +22,7 @@
 #include <rtems/score/sysstate.h>
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index d51b163..afc7aa1 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -23,6 +23,7 @@ include_rtems_score_HEADERS += include/rtems/score/context.h
 include_rtems_score_HEADERS += include/rtems/score/copyrt.h
 include_rtems_score_HEADERS += include/rtems/score/corebarrier.h
 include_rtems_score_HEADERS += include/rtems/score/coremsg.h
+include_rtems_score_HEADERS += include/rtems/score/coremsgimpl.h
 include_rtems_score_HEADERS += include/rtems/score/coremutex.h
 include_rtems_score_HEADERS += include/rtems/score/coremuteximpl.h
 include_rtems_score_HEADERS += include/rtems/score/coresem.h
@@ -88,7 +89,6 @@ endif
 include_rtems_score_HEADERS += inline/rtems/score/address.inl
 include_rtems_score_HEADERS += inline/rtems/score/chain.inl
 include_rtems_score_HEADERS += inline/rtems/score/corebarrier.inl
-include_rtems_score_HEADERS += inline/rtems/score/coremsg.inl
 include_rtems_score_HEADERS += inline/rtems/score/heap.inl
 include_rtems_score_HEADERS += inline/rtems/score/object.inl
 include_rtems_score_HEADERS += inline/rtems/score/priority.inl
diff --git a/cpukit/score/include/rtems/score/coremsg.h b/cpukit/score/include/rtems/score/coremsg.h
index d022391..6e37c61 100644
--- a/cpukit/score/include/rtems/score/coremsg.h
+++ b/cpukit/score/include/rtems/score/coremsg.h
@@ -19,6 +19,15 @@
 #ifndef _RTEMS_SCORE_COREMSG_H
 #define _RTEMS_SCORE_COREMSG_H
 
+#include <rtems/score/thread.h>
+#include <rtems/score/threadq.h>
+#include <rtems/score/priority.h>
+#include <rtems/score/watchdog.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  *  @defgroup ScoreMessageQueue Message Queue Handler
  *
@@ -29,12 +38,6 @@
  */
 /**@{*/
 
-#include <limits.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/watchdog.h>
-
 #if defined(RTEMS_POSIX_API)
   /**
    *  This macro is defined when an API is enabled that requires that the
@@ -61,21 +64,6 @@
   #define RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  @brief Callout provides to support global/multiprocessor operations.
- *
- *  The following type defines the callout which the API provides
- *  to support global/multiprocessor operations on message_queues.
- */
-typedef void ( *CORE_message_queue_API_mp_support_callout )(
-                 Thread_Control *,
-                 Objects_Id
-             );
-
 /**
  *  @brief Data types needed to manipulate the contents of message buffers.
  *
@@ -123,70 +111,6 @@ typedef enum {
 }   CORE_message_queue_Disciplines;
 
 /**
- *  @brief Used when appending messages onto a message queue.
- *
- *  This is the priority constant used when appending messages onto
- *  a message queue.
- */
-#define  CORE_MESSAGE_QUEUE_SEND_REQUEST   INT_MAX
-
-/**
- *  @brief Used when prepending messages onto a message queue.
- *
- *  This is the priority constant used when prepending messages onto
- *  a message queue.
- */
-#define  CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN
-
-/**
- *  @brief The modes in which a message may be submitted to a message queue.
- *
- *  The following type details the modes in which a message
- *  may be submitted to a message queue.  The message may be posted
- *  in a send or urgent fashion.
- *
- *  @note  All other values are message priorities.  Numerically smaller
- *         priorities indicate higher priority messages.
- */
-typedef int CORE_message_queue_Submit_types;
-
-/**
- *  @brief The possible set of Core Message Queue handler return statuses.
- *
- *  This enumerated type defines the possible set of Core Message
- *  Queue handler return statuses.
- */
-typedef enum {
-  /** This value indicates the operation completed sucessfully. */
-  CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL,
-  /** This value indicates that the message was too large for this queue. */
-  CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE,
-  /** This value indicates that there are too many messages pending. */
-  CORE_MESSAGE_QUEUE_STATUS_TOO_MANY,
-  /** This value indicates that a receive was unsuccessful. */
-  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED,
-  /** This value indicates that a blocking send was unsuccessful. */
-  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT,
-  /** This value indicates that the message queue being blocked upon
-   *  was deleted while the thread was waiting.
-   */
-  CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED,
-  /** This value indicates that the thread had to timeout while waiting
-   *  to receive a message because one did not become available.
-   */
-  CORE_MESSAGE_QUEUE_STATUS_TIMEOUT,
-  /** This value indicates that a blocking receive was unsuccessful. */
-  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
-}   CORE_message_queue_Status;
-
-/**
- *  @brief Core message queue last status value.
- *
- *  This is the last status value.
- */
-#define CORE_MESSAGE_QUEUE_STATUS_LAST CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
-
-/**
  *  @brief Control block used to manage the attributes of each message queue.
  *
  *  The following defines the control block used to manage the
@@ -257,255 +181,11 @@ typedef struct {
   Chain_Control                      Inactive_messages;
 }   CORE_message_queue_Control;
 
-/**
- *  @brief Initialize a message queue.
- *
- *  DESCRIPTION:
- *
- *  This package is the implementation of the CORE Message Queue Handler.
- *  This core object provides task synchronization and communication functions
- *  via messages passed to queue objects.
- *
- *  This routine initializes @a the_message_queue
- *      based on the parameters passed.
- *
- *  @param[in] the_message_queue points to the message queue to initialize
- *  @param[in] the_message_queue_attributes points to the attributes that
- *         will be used with this message queue instance
- *  @param[in] maximum_pending_messages is the maximum number of messages
- *         that will be allowed to pend at any given time
- *  @param[in] maximum_message_size is the size of largest message that
- *         may be sent to this message queue instance
- *
- *  @retval true if the message queue can be initialized.  In general,
- *         false will only be returned if memory for the pending
- *         messages cannot be allocated.
- */
-bool _CORE_message_queue_Initialize(
-  CORE_message_queue_Control    *the_message_queue,
-  CORE_message_queue_Attributes *the_message_queue_attributes,
-  uint32_t                       maximum_pending_messages,
-  size_t                         maximum_message_size
-);
-
-/**
- *  @brief Close a message queue.
- *
- *  DESCRIPTION:
- *  This package is the implementation of the CORE Message Queue Handler.
- *  This core object provides task synchronization and communication functions
- *  via messages passed to queue objects
- *
- *  This function closes a message by returning all allocated space and
- *  flushing @a the_message_queue's task wait queue.
- *
- *  @param[in] the_message_queue points to the message queue to close
- *  @param[in] remote_extract_callout is the routine to call for each thread
- *         that is extracted from the set of waiting threads
- *  @param[in] status is the status that each waiting thread will return
- *         from it's blocking service
- */
-void _CORE_message_queue_Close(
-  CORE_message_queue_Control *the_message_queue,
-  Thread_queue_Flush_callout  remote_extract_callout,
-  uint32_t                    status
-);
-
-/**
- *  @brief Flush pending messages.
- *
- *  DESCRIPTION:
- *  This package is the implementation of the CORE Message Queue Handler.
- *  This core object provides task synchronization and communication functions
- *  via messages passed to queue objects.
- *
- *  This function flushes @a the_message_queue's pending message queue.  The
- *  number of messages flushed from the queue is returned.
- *
- *  @param[in] the_message_queue points to the message queue to flush
- *
- *  @retval This method returns the number of message pending messages flushed.
- */
-uint32_t   _CORE_message_queue_Flush(
-  CORE_message_queue_Control *the_message_queue
-);
-
-/**
- *  @brief Flush all outstanding messages.
- *
- *  This routine flushes all outstanding messages and returns
- *  them to the inactive message chain.
- *
- *  @param[in] the_message_queue points to the message queue to flush
- *
- *  @retval This method returns the number of pending messages flushed.
- *
- *  - INTERRUPT LATENCY:
- *    + single case
- */
-uint32_t   _CORE_message_queue_Flush_support(
-  CORE_message_queue_Control *the_message_queue
-);
-
-#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
-/**
- *  @brief Flush waiting threads.
- *
- *  This function flushes the threads which are blocked on
- *  @a the_message_queue's pending message queue.  They are
- *  unblocked whether blocked sending or receiving. It returns
- *  the number of messages flushed from the queue.
- *
- *  @param[in] the_message_queue points to the message queue to flush
- *  @retval number of messages flushed from the queue
- */
-  void _CORE_message_queue_Flush_waiting_threads(
-    CORE_message_queue_Control *the_message_queue
-  );
-#endif
-
-/**
- *  @brief Broadcast a message to the message queue.
- *
- *  DESCRIPTION:
- *  This package is the implementation of the CORE Message Queue Handler.
- *  This core object provides task synchronization and communication functions
- *  via messages passed to queue objects.
- *
- *  This function sends a message for every thread waiting on the queue and
- *  returns the number of threads made ready by the message.
- *
- *  @param[in] the_message_queue points to the message queue
- *  @param[in] buffer is the starting address of the message to broadcast
- *  @param[in] size is the size of the message being broadcast
- *  @param[in] id is the RTEMS object Id associated with this message queue.
- *         It is used when unblocking a remote thread.
- *  @param[in] api_message_queue_mp_support is the routine to invoke if
- *         a thread that is unblocked is actually a remote thread.
- *  @param[out] count points to the variable that will contain the
- *         number of tasks that are sent this message
- *  @retval @a *count will contain the number of messages sent
- *  @retval indication of the successful completion or reason for failure
- */
-CORE_message_queue_Status _CORE_message_queue_Broadcast(
-  CORE_message_queue_Control                *the_message_queue,
-  const void                                *buffer,
-  size_t                                     size,
-  Objects_Id                                 id,
-  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
-  uint32_t                                  *count
-);
-
-/**
- *  @brief Submit a message to the message queue.
- *
- *  This routine implements the send and urgent message functions. It
- *  processes a message that is to be submitted to the designated
- *  message queue.  The message will either be processed as a
- *  send message which it will be inserted at the rear of the queue
- *  or it will be processed as an urgent message which will be inserted
- *  at the front of the queue.
- *
- *  @param[in] the_message_queue points to the message queue
- *  @param[in] buffer is the starting address of the message to send
- *  @param[in] size is the size of the message being send
- *  @param[in] id is the RTEMS object Id associated with this message queue.
- *         It is used when unblocking a remote thread.
- *  @param[in] api_message_queue_mp_support is the routine to invoke if
- *         a thread that is unblocked is actually a remote thread.
- *  @param[in] submit_type determines whether the message is prepended,
- *         appended, or enqueued in priority order.
- *  @param[in] wait indicates whether the calling thread is willing to block
- *         if the message queue is full.
- *  @param[in] timeout is the maximum number of clock ticks that the calling
- *         thread is willing to block if the message queue is full.
- *  @retval indication of the successful completion or reason for failure
- */
-CORE_message_queue_Status _CORE_message_queue_Submit(
-  CORE_message_queue_Control                *the_message_queue,
-  const void                                *buffer,
-  size_t                                     size,
-  Objects_Id                                 id,
-  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
-  CORE_message_queue_Submit_types            submit_type,
-  bool                                       wait,
-  Watchdog_Interval                          timeout
-);
-
-/**
- *  @brief Size a message from the message queue.
- *
- *  DESCRIPTION:
- *  This package is the implementation of the CORE Message Queue Handler.
- *  This core object provides task synchronization and communication functions
- *  via messages passed to queue objects.
- *
- *  This kernel routine dequeues a message, copies the message buffer to
- *  a given destination buffer, and frees the message buffer to the
- *  inactive message pool.  The thread will be blocked if wait is true,
- *  otherwise an error will be given to the thread if no messages are available.
- *
- *  @param[in] the_message_queue points to the message queue
- *  @param[in] id is the RTEMS object Id associated with this message queue.
- *         It is used when unblocking a remote thread.
- *  @param[in] buffer is the starting address of the message buffer to
- *         to be filled in with a message
- *  @param[in] size_p is a pointer to the size of the @a buffer and
- *         indicates the maximum size message that the caller can receive.
- *  @param[in] wait indicates whether the calling thread is willing to block
- *         if the message queue is empty.
- *  @param[in] timeout is the maximum number of clock ticks that the calling
- *         thread is willing to block if the message queue is empty.
- *
- *  @retval indication of the successful completion or reason for failure.
- *          On success, the location pointed to @a size_p will contain the
- *          size of the received message.
- *
- *  @note Returns message priority via return area in TCB.
- *
- *  - INTERRUPT LATENCY:
- *    + available
- *    + wait
- */
-void _CORE_message_queue_Seize(
-  CORE_message_queue_Control      *the_message_queue,
-  Objects_Id                       id,
-  void                            *buffer,
-  size_t                          *size_p,
-  bool                             wait,
-  Watchdog_Interval                timeout
-);
-
-/**
- *  @brief Insert a message into the message queue.
- *
- *  This kernel routine inserts the specified message into the
- *  message queue.  It is assumed that the message has been filled
- *  in before this routine is called.
- *
- *  @param[in] the_message_queue points to the message queue
- *  @param[in] the_message is the message to enqueue
- *  @param[in] submit_type determines whether the message is prepended,
- *         appended, or enqueued in priority order.
- *
- *  - INTERRUPT LATENCY:
- *    + insert
- */
-void _CORE_message_queue_Insert_message(
-  CORE_message_queue_Control        *the_message_queue,
-  CORE_message_queue_Buffer_control *the_message,
-  CORE_message_queue_Submit_types    submit_type
-);
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/coremsg.inl>
-#endif
+/**@}*/
 
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /*  end of include file */
diff --git a/cpukit/score/include/rtems/score/coremsgimpl.h b/cpukit/score/include/rtems/score/coremsgimpl.h
new file mode 100644
index 0000000..406a596
--- /dev/null
+++ b/cpukit/score/include/rtems/score/coremsgimpl.h
@@ -0,0 +1,577 @@
+/**
+ * @file
+ *
+ * @brief Inlined Routines in the Core Message Handler
+ *
+ * This include file contains the static inline implementation of all
+ * inlined routines in the Core Message Handler.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2009.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef _RTEMS_SCORE_COREMSGIMPL_H
+#define _RTEMS_SCORE_COREMSGIMPL_H
+
+#include <rtems/score/coremsg.h>
+
+#include <limits.h>
+#include <string.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreMessageQueue
+ */
+/**@{**/
+
+/**
+ *  @brief Used when appending messages onto a message queue.
+ *
+ *  This is the priority constant used when appending messages onto
+ *  a message queue.
+ */
+#define  CORE_MESSAGE_QUEUE_SEND_REQUEST   INT_MAX
+
+/**
+ *  @brief Used when prepending messages onto a message queue.
+ *
+ *  This is the priority constant used when prepending messages onto
+ *  a message queue.
+ */
+#define  CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN
+
+/**
+ *  @brief The modes in which a message may be submitted to a message queue.
+ *
+ *  The following type details the modes in which a message
+ *  may be submitted to a message queue.  The message may be posted
+ *  in a send or urgent fashion.
+ *
+ *  @note  All other values are message priorities.  Numerically smaller
+ *         priorities indicate higher priority messages.
+ */
+typedef int CORE_message_queue_Submit_types;
+
+/**
+ *  @brief The possible set of Core Message Queue handler return statuses.
+ *
+ *  This enumerated type defines the possible set of Core Message
+ *  Queue handler return statuses.
+ */
+typedef enum {
+  /** This value indicates the operation completed sucessfully. */
+  CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL,
+  /** This value indicates that the message was too large for this queue. */
+  CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE,
+  /** This value indicates that there are too many messages pending. */
+  CORE_MESSAGE_QUEUE_STATUS_TOO_MANY,
+  /** This value indicates that a receive was unsuccessful. */
+  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED,
+  /** This value indicates that a blocking send was unsuccessful. */
+  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT,
+  /** This value indicates that the message queue being blocked upon
+   *  was deleted while the thread was waiting.
+   */
+  CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED,
+  /** This value indicates that the thread had to timeout while waiting
+   *  to receive a message because one did not become available.
+   */
+  CORE_MESSAGE_QUEUE_STATUS_TIMEOUT,
+  /** This value indicates that a blocking receive was unsuccessful. */
+  CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
+}   CORE_message_queue_Status;
+
+/**
+ *  @brief Core message queue last status value.
+ *
+ *  This is the last status value.
+ */
+#define CORE_MESSAGE_QUEUE_STATUS_LAST CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT
+
+/**
+ *  @brief Callout provides to support global/multiprocessor operations.
+ *
+ *  The following type defines the callout which the API provides
+ *  to support global/multiprocessor operations on message_queues.
+ */
+typedef void ( *CORE_message_queue_API_mp_support_callout )(
+                 Thread_Control *,
+                 Objects_Id
+             );
+
+/**
+ *  @brief Initialize a message queue.
+ *
+ *  DESCRIPTION:
+ *
+ *  This package is the implementation of the CORE Message Queue Handler.
+ *  This core object provides task synchronization and communication functions
+ *  via messages passed to queue objects.
+ *
+ *  This routine initializes @a the_message_queue
+ *      based on the parameters passed.
+ *
+ *  @param[in] the_message_queue points to the message queue to initialize
+ *  @param[in] the_message_queue_attributes points to the attributes that
+ *         will be used with this message queue instance
+ *  @param[in] maximum_pending_messages is the maximum number of messages
+ *         that will be allowed to pend at any given time
+ *  @param[in] maximum_message_size is the size of largest message that
+ *         may be sent to this message queue instance
+ *
+ *  @retval true if the message queue can be initialized.  In general,
+ *         false will only be returned if memory for the pending
+ *         messages cannot be allocated.
+ */
+bool _CORE_message_queue_Initialize(
+  CORE_message_queue_Control    *the_message_queue,
+  CORE_message_queue_Attributes *the_message_queue_attributes,
+  uint32_t                       maximum_pending_messages,
+  size_t                         maximum_message_size
+);
+
+/**
+ *  @brief Close a message queue.
+ *
+ *  DESCRIPTION:
+ *  This package is the implementation of the CORE Message Queue Handler.
+ *  This core object provides task synchronization and communication functions
+ *  via messages passed to queue objects
+ *
+ *  This function closes a message by returning all allocated space and
+ *  flushing @a the_message_queue's task wait queue.
+ *
+ *  @param[in] the_message_queue points to the message queue to close
+ *  @param[in] remote_extract_callout is the routine to call for each thread
+ *         that is extracted from the set of waiting threads
+ *  @param[in] status is the status that each waiting thread will return
+ *         from it's blocking service
+ */
+void _CORE_message_queue_Close(
+  CORE_message_queue_Control *the_message_queue,
+  Thread_queue_Flush_callout  remote_extract_callout,
+  uint32_t                    status
+);
+
+/**
+ *  @brief Flush pending messages.
+ *
+ *  DESCRIPTION:
+ *  This package is the implementation of the CORE Message Queue Handler.
+ *  This core object provides task synchronization and communication functions
+ *  via messages passed to queue objects.
+ *
+ *  This function flushes @a the_message_queue's pending message queue.  The
+ *  number of messages flushed from the queue is returned.
+ *
+ *  @param[in] the_message_queue points to the message queue to flush
+ *
+ *  @retval This method returns the number of message pending messages flushed.
+ */
+uint32_t   _CORE_message_queue_Flush(
+  CORE_message_queue_Control *the_message_queue
+);
+
+/**
+ *  @brief Flush all outstanding messages.
+ *
+ *  This routine flushes all outstanding messages and returns
+ *  them to the inactive message chain.
+ *
+ *  @param[in] the_message_queue points to the message queue to flush
+ *
+ *  @retval This method returns the number of pending messages flushed.
+ *
+ *  - INTERRUPT LATENCY:
+ *    + single case
+ */
+uint32_t   _CORE_message_queue_Flush_support(
+  CORE_message_queue_Control *the_message_queue
+);
+
+#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
+/**
+ *  @brief Flush waiting threads.
+ *
+ *  This function flushes the threads which are blocked on
+ *  @a the_message_queue's pending message queue.  They are
+ *  unblocked whether blocked sending or receiving. It returns
+ *  the number of messages flushed from the queue.
+ *
+ *  @param[in] the_message_queue points to the message queue to flush
+ *  @retval number of messages flushed from the queue
+ */
+  void _CORE_message_queue_Flush_waiting_threads(
+    CORE_message_queue_Control *the_message_queue
+  );
+#endif
+
+/**
+ *  @brief Broadcast a message to the message queue.
+ *
+ *  DESCRIPTION:
+ *  This package is the implementation of the CORE Message Queue Handler.
+ *  This core object provides task synchronization and communication functions
+ *  via messages passed to queue objects.
+ *
+ *  This function sends a message for every thread waiting on the queue and
+ *  returns the number of threads made ready by the message.
+ *
+ *  @param[in] the_message_queue points to the message queue
+ *  @param[in] buffer is the starting address of the message to broadcast
+ *  @param[in] size is the size of the message being broadcast
+ *  @param[in] id is the RTEMS object Id associated with this message queue.
+ *         It is used when unblocking a remote thread.
+ *  @param[in] api_message_queue_mp_support is the routine to invoke if
+ *         a thread that is unblocked is actually a remote thread.
+ *  @param[out] count points to the variable that will contain the
+ *         number of tasks that are sent this message
+ *  @retval @a *count will contain the number of messages sent
+ *  @retval indication of the successful completion or reason for failure
+ */
+CORE_message_queue_Status _CORE_message_queue_Broadcast(
+  CORE_message_queue_Control                *the_message_queue,
+  const void                                *buffer,
+  size_t                                     size,
+  Objects_Id                                 id,
+  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
+  uint32_t                                  *count
+);
+
+/**
+ *  @brief Submit a message to the message queue.
+ *
+ *  This routine implements the send and urgent message functions. It
+ *  processes a message that is to be submitted to the designated
+ *  message queue.  The message will either be processed as a
+ *  send message which it will be inserted at the rear of the queue
+ *  or it will be processed as an urgent message which will be inserted
+ *  at the front of the queue.
+ *
+ *  @param[in] the_message_queue points to the message queue
+ *  @param[in] buffer is the starting address of the message to send
+ *  @param[in] size is the size of the message being send
+ *  @param[in] id is the RTEMS object Id associated with this message queue.
+ *         It is used when unblocking a remote thread.
+ *  @param[in] api_message_queue_mp_support is the routine to invoke if
+ *         a thread that is unblocked is actually a remote thread.
+ *  @param[in] submit_type determines whether the message is prepended,
+ *         appended, or enqueued in priority order.
+ *  @param[in] wait indicates whether the calling thread is willing to block
+ *         if the message queue is full.
+ *  @param[in] timeout is the maximum number of clock ticks that the calling
+ *         thread is willing to block if the message queue is full.
+ *  @retval indication of the successful completion or reason for failure
+ */
+CORE_message_queue_Status _CORE_message_queue_Submit(
+  CORE_message_queue_Control                *the_message_queue,
+  const void                                *buffer,
+  size_t                                     size,
+  Objects_Id                                 id,
+  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
+  CORE_message_queue_Submit_types            submit_type,
+  bool                                       wait,
+  Watchdog_Interval                          timeout
+);
+
+/**
+ *  @brief Size a message from the message queue.
+ *
+ *  DESCRIPTION:
+ *  This package is the implementation of the CORE Message Queue Handler.
+ *  This core object provides task synchronization and communication functions
+ *  via messages passed to queue objects.
+ *
+ *  This kernel routine dequeues a message, copies the message buffer to
+ *  a given destination buffer, and frees the message buffer to the
+ *  inactive message pool.  The thread will be blocked if wait is true,
+ *  otherwise an error will be given to the thread if no messages are available.
+ *
+ *  @param[in] the_message_queue points to the message queue
+ *  @param[in] id is the RTEMS object Id associated with this message queue.
+ *         It is used when unblocking a remote thread.
+ *  @param[in] buffer is the starting address of the message buffer to
+ *         to be filled in with a message
+ *  @param[in] size_p is a pointer to the size of the @a buffer and
+ *         indicates the maximum size message that the caller can receive.
+ *  @param[in] wait indicates whether the calling thread is willing to block
+ *         if the message queue is empty.
+ *  @param[in] timeout is the maximum number of clock ticks that the calling
+ *         thread is willing to block if the message queue is empty.
+ *
+ *  @retval indication of the successful completion or reason for failure.
+ *          On success, the location pointed to @a size_p will contain the
+ *          size of the received message.
+ *
+ *  @note Returns message priority via return area in TCB.
+ *
+ *  - INTERRUPT LATENCY:
+ *    + available
+ *    + wait
+ */
+void _CORE_message_queue_Seize(
+  CORE_message_queue_Control      *the_message_queue,
+  Objects_Id                       id,
+  void                            *buffer,
+  size_t                          *size_p,
+  bool                             wait,
+  Watchdog_Interval                timeout
+);
+
+/**
+ *  @brief Insert a message into the message queue.
+ *
+ *  This kernel routine inserts the specified message into the
+ *  message queue.  It is assumed that the message has been filled
+ *  in before this routine is called.
+ *
+ *  @param[in] the_message_queue points to the message queue
+ *  @param[in] the_message is the message to enqueue
+ *  @param[in] submit_type determines whether the message is prepended,
+ *         appended, or enqueued in priority order.
+ *
+ *  - INTERRUPT LATENCY:
+ *    + insert
+ */
+void _CORE_message_queue_Insert_message(
+  CORE_message_queue_Control        *the_message_queue,
+  CORE_message_queue_Buffer_control *the_message,
+  CORE_message_queue_Submit_types    submit_type
+);
+
+/**
+ * This routine sends a message to the end of the specified message queue.
+ */
+RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Send(
+  CORE_message_queue_Control                *the_message_queue,
+  const void                                *buffer,
+  size_t                                     size,
+  Objects_Id                                 id,
+  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
+  bool                                    wait,
+  Watchdog_Interval                          timeout
+)
+{
+  return _CORE_message_queue_Submit(
+    the_message_queue,
+    buffer,
+    size,
+    id,
+    api_message_queue_mp_support,
+    CORE_MESSAGE_QUEUE_SEND_REQUEST,
+    wait,     /* sender may block */
+    timeout   /* timeout interval */
+  );
+}
+
+/**
+ * This routine sends a message to the front of the specified message queue.
+ */
+RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Urgent(
+  CORE_message_queue_Control                *the_message_queue,
+  const void                                *buffer,
+  size_t                                     size,
+  Objects_Id                                 id,
+  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
+  bool                                    wait,
+  Watchdog_Interval                          timeout
+)
+{
+  return _CORE_message_queue_Submit(
+    the_message_queue,
+    buffer,
+    size,
+    id,
+    api_message_queue_mp_support,
+    CORE_MESSAGE_QUEUE_URGENT_REQUEST,
+    wait,     /* sender may block */
+    timeout   /* timeout interval */
+ );
+}
+
+/**
+ * This routine copies the contents of the source message buffer
+ * to the destination message buffer.
+ */
+RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer (
+  const void *source,
+  void       *destination,
+  size_t      size
+)
+{
+  memcpy(destination, source, size);
+}
+
+/**
+ * This function allocates a message buffer from the inactive
+ * message buffer chain.
+ */
+RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
+_CORE_message_queue_Allocate_message_buffer (
+    CORE_message_queue_Control *the_message_queue
+)
+{
+   return (CORE_message_queue_Buffer_control *)
+     _Chain_Get( &the_message_queue->Inactive_messages );
+}
+
+/**
+ * This routine frees a message buffer to the inactive
+ * message buffer chain.
+ */
+RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
+  CORE_message_queue_Control        *the_message_queue,
+  CORE_message_queue_Buffer_control *the_message
+)
+{
+  _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
+}
+
+/**
+ * This function returns the priority of @a the_message.
+ *
+ * @note It encapsulates the optional behavior that message priority is
+ *       disabled if no API requires it.
+ */
+RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority (
+  CORE_message_queue_Buffer_control *the_message
+)
+{
+  #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
+    return the_message->priority;
+  #else
+    return 0;
+  #endif
+}
+
+/**
+ * This function sets the priority of @a the_message.
+ *
+ * @note It encapsulates the optional behavior that message priority is
+ *       disabled if no API requires it.
+ */
+RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_message_priority (
+  CORE_message_queue_Buffer_control *the_message,
+  int                                priority
+)
+{
+  #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
+    the_message->priority = priority;
+  #endif
+}
+
+/**
+ * This function removes the first message from the_message_queue
+ * and returns a pointer to it.
+ */
+RTEMS_INLINE_ROUTINE
+  CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
+  CORE_message_queue_Control *the_message_queue
+)
+{
+  return (CORE_message_queue_Buffer_control *)
+    _Chain_Get_unprotected( &the_message_queue->Pending_messages );
+}
+
+/**
+ * This function returns true if the priority attribute is
+ * enabled in the attribute_set and false otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
+  CORE_message_queue_Attributes *the_attribute
+)
+{
+  return
+    (the_attribute->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY);
+}
+
+/**
+ * This routine places the_message at the rear of the outstanding
+ * messages on the_message_queue.
+ */
+RTEMS_INLINE_ROUTINE void _CORE_message_queue_Append_unprotected (
+  CORE_message_queue_Control        *the_message_queue,
+  CORE_message_queue_Buffer_control *the_message
+)
+{
+  _Chain_Append_unprotected(
+    &the_message_queue->Pending_messages,
+    &the_message->Node
+  );
+}
+
+/**
+ * This routine places the_message at the front of the outstanding
+ * messages on the_message_queue.
+ */
+RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected (
+  CORE_message_queue_Control        *the_message_queue,
+  CORE_message_queue_Buffer_control *the_message
+)
+{
+  _Chain_Prepend_unprotected(
+    &the_message_queue->Pending_messages,
+    &the_message->Node
+  );
+}
+
+/**
+ * This function returns true if the_message_queue is true and false otherwise.
+ */
+RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_null (
+  CORE_message_queue_Control *the_message_queue
+)
+{
+  return ( the_message_queue == NULL  );
+}
+
+#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
+  /**
+   * This function returns true if notification is enabled on this message
+   * queue and false otherwise.
+   */
+  RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_notify_enabled (
+    CORE_message_queue_Control *the_message_queue
+  )
+  {
+    return (the_message_queue->notify_handler != NULL);
+  }
+#endif
+
+/**
+ * This routine initializes the notification information for
+ * @a the_message_queue.
+ */
+#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
+  RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify (
+    CORE_message_queue_Control        *the_message_queue,
+    CORE_message_queue_Notify_Handler  the_handler,
+    void                              *the_argument
+  )
+  {
+    the_message_queue->notify_handler  = the_handler;
+    the_message_queue->notify_argument = the_argument;
+  }
+#else
+  /* turn it into nothing if not enabled */
+  #define _CORE_message_queue_Set_notify( \
+           the_message_queue, the_handler, the_argument )
+#endif
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/coremsg.inl b/cpukit/score/inline/rtems/score/coremsg.inl
deleted file mode 100644
index 986fc3f..0000000
--- a/cpukit/score/inline/rtems/score/coremsg.inl
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- * @file
- *
- * @brief Inlined Routines in the Core Message Handler
- *
- * This include file contains the static inline implementation of all
- * inlined routines in the Core Message Handler.
- */
-
-/*
- *  COPYRIGHT (c) 1989-2009.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.com/license/LICENSE.
- */
-
-#ifndef _RTEMS_SCORE_COREMSG_H
-# error "Never use <rtems/score/coremsg.inl> directly; include <rtems/score/coremsg.h> instead."
-#endif
-
-#ifndef _RTEMS_SCORE_COREMSG_INL
-#define _RTEMS_SCORE_COREMSG_INL
-
-/**
- * @addtogroup ScoreMessageQueue
- */
-/**@{**/
-
-#include <string.h>   /* needed for memcpy */
-
-/**
- * This routine sends a message to the end of the specified message queue.
- */
-RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Send(
-  CORE_message_queue_Control                *the_message_queue,
-  const void                                *buffer,
-  size_t                                     size,
-  Objects_Id                                 id,
-  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
-  bool                                    wait,
-  Watchdog_Interval                          timeout
-)
-{
-  return _CORE_message_queue_Submit(
-    the_message_queue,
-    buffer,
-    size,
-    id,
-    api_message_queue_mp_support,
-    CORE_MESSAGE_QUEUE_SEND_REQUEST,
-    wait,     /* sender may block */
-    timeout   /* timeout interval */
-  );
-}
-
-/**
- * This routine sends a message to the front of the specified message queue.
- */
-RTEMS_INLINE_ROUTINE CORE_message_queue_Status _CORE_message_queue_Urgent(
-  CORE_message_queue_Control                *the_message_queue,
-  const void                                *buffer,
-  size_t                                     size,
-  Objects_Id                                 id,
-  CORE_message_queue_API_mp_support_callout  api_message_queue_mp_support,
-  bool                                    wait,
-  Watchdog_Interval                          timeout
-)
-{
-  return _CORE_message_queue_Submit(
-    the_message_queue,
-    buffer,
-    size,
-    id,
-    api_message_queue_mp_support,
-    CORE_MESSAGE_QUEUE_URGENT_REQUEST,
-    wait,     /* sender may block */
-    timeout   /* timeout interval */
- );
-}
-
-/**
- * This routine copies the contents of the source message buffer
- * to the destination message buffer.
- */
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer (
-  const void *source,
-  void       *destination,
-  size_t      size
-)
-{
-  memcpy(destination, source, size);
-}
-
-/**
- * This function allocates a message buffer from the inactive
- * message buffer chain.
- */
-RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
-_CORE_message_queue_Allocate_message_buffer (
-    CORE_message_queue_Control *the_message_queue
-)
-{
-   return (CORE_message_queue_Buffer_control *)
-     _Chain_Get( &the_message_queue->Inactive_messages );
-}
-
-/**
- * This routine frees a message buffer to the inactive
- * message buffer chain.
- */
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
-  CORE_message_queue_Control        *the_message_queue,
-  CORE_message_queue_Buffer_control *the_message
-)
-{
-  _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
-}
-
-/**
- * This function returns the priority of @a the_message.
- *
- * @note It encapsulates the optional behavior that message priority is
- *       disabled if no API requires it.
- */
-RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority (
-  CORE_message_queue_Buffer_control *the_message
-)
-{
-  #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
-    return the_message->priority;
-  #else
-    return 0;
-  #endif
-}
-
-/**
- * This function sets the priority of @a the_message.
- *
- * @note It encapsulates the optional behavior that message priority is
- *       disabled if no API requires it.
- */
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_message_priority (
-  CORE_message_queue_Buffer_control *the_message,
-  int                                priority
-)
-{
-  #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
-    the_message->priority = priority;
-  #endif
-}
-
-/**
- * This function removes the first message from the_message_queue
- * and returns a pointer to it.
- */
-RTEMS_INLINE_ROUTINE
-  CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
-  CORE_message_queue_Control *the_message_queue
-)
-{
-  return (CORE_message_queue_Buffer_control *)
-    _Chain_Get_unprotected( &the_message_queue->Pending_messages );
-}
-
-/**
- * This function returns true if the priority attribute is
- * enabled in the attribute_set and false otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
-  CORE_message_queue_Attributes *the_attribute
-)
-{
-  return
-    (the_attribute->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY);
-}
-
-/**
- * This routine places the_message at the rear of the outstanding
- * messages on the_message_queue.
- */
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Append_unprotected (
-  CORE_message_queue_Control        *the_message_queue,
-  CORE_message_queue_Buffer_control *the_message
-)
-{
-  _Chain_Append_unprotected(
-    &the_message_queue->Pending_messages,
-    &the_message->Node
-  );
-}
-
-/**
- * This routine places the_message at the front of the outstanding
- * messages on the_message_queue.
- */
-RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected (
-  CORE_message_queue_Control        *the_message_queue,
-  CORE_message_queue_Buffer_control *the_message
-)
-{
-  _Chain_Prepend_unprotected(
-    &the_message_queue->Pending_messages,
-    &the_message->Node
-  );
-}
-
-/**
- * This function returns true if the_message_queue is true and false otherwise.
- */
-RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_null (
-  CORE_message_queue_Control *the_message_queue
-)
-{
-  return ( the_message_queue == NULL  );
-}
-
-#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
-  /**
-   * This function returns true if notification is enabled on this message
-   * queue and false otherwise.
-   */
-  RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_notify_enabled (
-    CORE_message_queue_Control *the_message_queue
-  )
-  {
-    return (the_message_queue->notify_handler != NULL);
-  }
-#endif
-
-/**
- * This routine initializes the notification information for
- * @a the_message_queue.
- */
-#if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
-  RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify (
-    CORE_message_queue_Control        *the_message_queue,
-    CORE_message_queue_Notify_Handler  the_handler,
-    void                              *the_argument
-  )
-  {
-    the_message_queue->notify_handler  = the_handler;
-    the_message_queue->notify_argument = the_argument;
-  }
-#else
-  /* turn it into nothing if not enabled */
-  #define _CORE_message_queue_Set_notify( \
-           the_message_queue, the_handler, the_argument )
-#endif
-
-/** @} */
-
-#endif
-/* end of include file */
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index eee9720..9a92930 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -75,6 +75,10 @@ $(PROJECT_INCLUDE)/rtems/score/coremsg.h: include/rtems/score/coremsg.h $(PROJEC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremsg.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremsg.h
 
+$(PROJECT_INCLUDE)/rtems/score/coremsgimpl.h: include/rtems/score/coremsgimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremsgimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremsgimpl.h
+
 $(PROJECT_INCLUDE)/rtems/score/coremutex.h: include/rtems/score/coremutex.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremutex.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremutex.h
@@ -283,10 +287,6 @@ $(PROJECT_INCLUDE)/rtems/score/corebarrier.inl: inline/rtems/score/corebarrier.i
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/corebarrier.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/corebarrier.inl
 
-$(PROJECT_INCLUDE)/rtems/score/coremsg.inl: inline/rtems/score/coremsg.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/coremsg.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/coremsg.inl
-
 $(PROJECT_INCLUDE)/rtems/score/heap.inl: inline/rtems/score/heap.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/heap.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/heap.inl
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c
index e02989b..d620a52 100644
--- a/cpukit/score/src/coremsg.c
+++ b/cpukit/score/src/coremsg.c
@@ -22,7 +22,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c
index 7cee3e8..4591d0e 100644
--- a/cpukit/score/src/coremsgbroadcast.c
+++ b/cpukit/score/src/coremsgbroadcast.c
@@ -22,7 +22,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgclose.c b/cpukit/score/src/coremsgclose.c
index 38b0183..367357c 100644
--- a/cpukit/score/src/coremsgclose.c
+++ b/cpukit/score/src/coremsgclose.c
@@ -22,7 +22,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgflush.c b/cpukit/score/src/coremsgflush.c
index 0681cbb..4185f4f 100644
--- a/cpukit/score/src/coremsgflush.c
+++ b/cpukit/score/src/coremsgflush.c
@@ -22,7 +22,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgflushsupp.c b/cpukit/score/src/coremsgflushsupp.c
index 4ea071f..dbc62ca 100644
--- a/cpukit/score/src/coremsgflushsupp.c
+++ b/cpukit/score/src/coremsgflushsupp.c
@@ -23,7 +23,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgflushwait.c b/cpukit/score/src/coremsgflushwait.c
index f2b1f08..5816ce8 100644
--- a/cpukit/score/src/coremsgflushwait.c
+++ b/cpukit/score/src/coremsgflushwait.c
@@ -23,7 +23,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsginsert.c b/cpukit/score/src/coremsginsert.c
index 2ac804b..69836df 100644
--- a/cpukit/score/src/coremsginsert.c
+++ b/cpukit/score/src/coremsginsert.c
@@ -22,7 +22,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c
index bb49810..f0567db 100644
--- a/cpukit/score/src/coremsgseize.c
+++ b/cpukit/score/src/coremsgseize.c
@@ -22,7 +22,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 8f6ffa3..c5e9a6b 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -23,7 +23,7 @@
 #include <rtems/score/chain.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
-#include <rtems/score/coremsg.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-- 
1.7.7




More information about the devel mailing list