[rtems commit] doxygen: score: adjust doc in coremsgimpl.h to doxygen guidelines

Sebastian Huber sebh at rtems.org
Mon May 13 05:52:27 UTC 2019


Module:    rtems
Branch:    master
Commit:    0865cd2716777beab1bb7a873de06111b19e1abd
Changeset: http://git.rtems.org/rtems/commit/?id=0865cd2716777beab1bb7a873de06111b19e1abd

Author:    Andreas Dachsberger <andreas.dachsberger at embedded-brains.de>
Date:      Fri Apr  5 12:39:51 2019 +0200

doxygen: score: adjust doc in coremsgimpl.h to doxygen guidelines

Update #3706.

---

 cpukit/include/rtems/score/coremsgimpl.h | 356 +++++++++++++++++++++----------
 1 file changed, 239 insertions(+), 117 deletions(-)

diff --git a/cpukit/include/rtems/score/coremsgimpl.h b/cpukit/include/rtems/score/coremsgimpl.h
index bb90797..e598dce 100644
--- a/cpukit/include/rtems/score/coremsgimpl.h
+++ b/cpukit/include/rtems/score/coremsgimpl.h
@@ -1,6 +1,8 @@
 /**
  * @file
  *
+ * @ingroup RTEMSScoreMessageQueue
+ *
  * @brief Inlined Routines in the Core Message Handler
  *
  * This include file contains the static inline implementation of all
@@ -34,8 +36,9 @@ extern "C" {
 
 /**
  * @addtogroup RTEMSScoreMessageQueue
+ *
+ * @{
  */
-/**@{**/
 
 /**
  *  @brief Used when appending messages onto a message queue.
@@ -66,25 +69,24 @@ extern "C" {
 typedef int CORE_message_queue_Submit_types;
 
 /**
- *  @brief Initialize a message queue.
+ * @brief Initializes a message queue.
  *
- *  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 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.
+ * 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] discipline the blocking discipline
- *  @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
+ * @param[out] the_message_queue The message queue to initialize.
+ * @param discipline The blocking discipline for the message queue.
+ * @param maximum_pending_messages The maximum number of messages
+ *        that will be allowed to pend at any given time.
+ * @param maximum_message_size The size of the 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.
+ * @retval true The message queue can be initialized.
+ * @retval false Memory for the pending messages cannot be allocated.
  */
 bool _CORE_message_queue_Initialize(
   CORE_message_queue_Control     *the_message_queue,
@@ -94,18 +96,18 @@ bool _CORE_message_queue_Initialize(
 );
 
 /**
- *  @brief Close a message queue.
+ * @brief Closes a message queue.
  *
- *  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 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.
+ * 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] queue_context The thread queue context used for
- *    _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
+ * @param[in, out] the_message_queue The message queue to close.
+ * @param[in, out] queue_context The thread queue context used for
+ *   _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
  */
 void _CORE_message_queue_Close(
   CORE_message_queue_Control *the_message_queue,
@@ -113,19 +115,19 @@ void _CORE_message_queue_Close(
 );
 
 /**
- *  @brief Flush pending messages.
+ * @brief Flushes pending messages.
  *
- *  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 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.
+ * 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
- *  @param[in] queue_context The thread queue context with interrupts disabled.
+ * @param[in, out] the_message_queue The message queue to flush.
+ * @param queue_context The thread queue context with interrupts disabled.
  *
- *  @retval This method returns the number of message pending messages flushed.
+ * @return This method returns the number of message pending messages flushed.
  */
 uint32_t   _CORE_message_queue_Flush(
   CORE_message_queue_Control *the_message_queue,
@@ -134,15 +136,16 @@ uint32_t   _CORE_message_queue_Flush(
 
 #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
 /**
- *  @brief Flush waiting threads.
+ * @brief Flushes 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.
  *
- *  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, out] the_message_queue The message queue to flush.
  *
- *  @param[in] the_message_queue points to the message queue to flush
- *  @retval number of messages flushed from the queue
+ * @return This method returns the number of messages flushed from the queue.
  */
   void _CORE_message_queue_Flush_waiting_threads(
     CORE_message_queue_Control *the_message_queue
@@ -150,24 +153,25 @@ uint32_t   _CORE_message_queue_Flush(
 #endif
 
 /**
- *  @brief Broadcast a message to the message queue.
- *
- *  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[out] count points to the variable that will contain the
- *         number of tasks that are sent this message
- *  @param[in] queue_context The thread queue context used for
- *    _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
- *  @retval @a *count will contain the number of messages sent
- *  @retval indication of the successful completion or reason for failure
+ * @brief Broadcasts a message to the message queue.
+ *
+ * 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, out] the_message_queue The message queue to operate upon.
+ * @param buffer The starting address of the message to broadcast.
+ * @param size The size of the message being broadcast.
+ * @param[out] count The variable that will contain the
+ *        number of tasks that are sent this message.
+ * @param queue_context The thread queue context used for
+ *   _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
+ *
+ * @retval STATUS_SUCCESSFUL The message was successfully broadcast.
+ * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big.
  */
 Status_Control _CORE_message_queue_Broadcast(
   CORE_message_queue_Control *the_message_queue,
@@ -178,25 +182,31 @@ Status_Control _CORE_message_queue_Broadcast(
 );
 
 /**
- *  @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] 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] queue_context The thread queue context used for
- *    _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
- *  @retval indication of the successful completion or reason for failure
+ * @brief Submits 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, out] the_message_queue The message queue to operate upon.
+ * @param executing The executing thread.
+ * @param buffer The starting address of the message to send.
+ * @param size The size of the message being send.
+ * @param submit_type Determines whether the message is prepended,
+ *        appended, or enqueued in priority order.
+ * @param wait Indicates whether the calling thread is willing to block
+ *        if the message queue is full.
+ * @param queue_context The thread queue context used for
+ *   _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
+ *
+ * @retval STATUS_SUCCESSFUL The message was successfully submitted to the message queue.
+ * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big.
+ * @retval STATUS_TOO_MANY No message buffers were available.
+ * @retval STATUS_MESSAGE_QUEUE_WAIT_IN_ISR The caller is in an ISR, do not block!
+ * @retval STATUS_TIMEOUT A timeout occured.
  */
 Status_Control _CORE_message_queue_Submit(
   CORE_message_queue_Control       *the_message_queue,
@@ -209,36 +219,37 @@ Status_Control _CORE_message_queue_Submit(
 );
 
 /**
- *  @brief Size a message from the message queue.
- *
- *  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] 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] queue_context The thread queue context used for
- *    _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
- *
- *  @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
+ * @brief Seizes a message from the message queue.
+ *
+ * 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, out] the_message_queue The message queue to seize a message from.
+ * @param executing The executing thread.
+ * @param[out] buffer The starting address of the message buffer to
+ *        to be filled in with a message.
+ * @param[out] size_p The size of the @a buffer,
+ *        indicates the maximum size message that the caller can receive.
+ * @param wait Indicates whether the calling thread is willing to block
+ *        if the message queue is empty.
+ * @param queue_context The thread queue context used for
+ *   _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
+ *
+ * @retval STATUS_SUCCESSFUL The message was successfully seized from the message queue.
+ * @retval STATUS_UNSATISFIED Wait was set to false and there is currently no pending message.
+ * @retval STATUS_TIMEOUT A timeout occured.
+ *
+ * @note Returns message priority via return area in TCB.
+ *
+ * - INTERRUPT LATENCY:
+ *   + available
+ *   + wait
  */
 Status_Control _CORE_message_queue_Seize(
   CORE_message_queue_Control *the_message_queue,
@@ -250,17 +261,17 @@ Status_Control _CORE_message_queue_Seize(
 );
 
 /**
- *  @brief Insert a message into the message queue.
+ * @brief Inserts a message into the message queue.
  *
- *  Copies the specified content into the message storage space and then
- *  inserts the message into the message queue according to the submit type.
+ * Copies the specified content into the message storage space and then
+ * inserts the message into the message queue according to the submit type.
  *
- *  @param[in] the_message_queue points to the message queue
- *  @param[in] the_message is the message to enqueue
- *  @param[in] content_source the message content source
- *  @param[in] content_size the message content size in bytes
- *  @param[in] submit_type determines whether the message is prepended,
- *         appended, or enqueued in priority order.
+ * @param[in, out] the_message_queue The message queue to insert a message in.
+ * @param[in, out] the_message The message to insert in the message queue.
+ * @param content_source The message content source.
+ * @param content_size The message content size in bytes.
+ * @param submit_type Determines whether the message is prepended,
+ *        appended, or enqueued in priority order.
  */
 void _CORE_message_queue_Insert_message(
   CORE_message_queue_Control        *the_message_queue,
@@ -270,6 +281,23 @@ void _CORE_message_queue_Insert_message(
   CORE_message_queue_Submit_types    submit_type
 );
 
+/**
+ * @brief Sends a message to the message queue.
+ *
+ * @param[in, out] the_message_queue The message queue to send a message to.
+ * @param buffer The starting address of the message to send.
+ * @param sizeis The size of the message being send.
+ * @param wait Indicates whether the calling thread is willing to block
+ *        if the message queue is full.
+ * @param queue_context The thread queue context used for
+ *   _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
+ *
+ * @retval STATUS_SUCCESSFUL The message was successfully submitted to the message queue.
+ * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big.
+ * @retval STATUS_TOO_MANY No message buffers were available.
+ * @retval STATUS_MESSAGE_QUEUE_WAIT_IN_ISR The caller is in an ISR, do not block!
+ * @retval STATUS_TIMEOUT A timeout occured.
+ */
 RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Send(
   CORE_message_queue_Control       *the_message_queue,
   const void                       *buffer,
@@ -289,6 +317,23 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Send(
   );
 }
 
+/**
+ * @brief Sends an urgent message to the message queue.
+ *
+ * @param[in, out] the_message_queue The message queue to send an urgent message to.
+ * @param buffer The starting address of the message to send.
+ * @param sizeis The size of the message being send.
+ * @param wait Indicates whether the calling thread is willing to block
+ *        if the message queue is full.
+ * @param queue_context The thread queue context used for
+ *   _CORE_message_queue_Acquire() or _CORE_message_queue_Acquire_critical().
+ *
+ * @retval STATUS_SUCCESSFUL The message was successfully submitted to the message queue.
+ * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big.
+ * @retval STATUS_TOO_MANY No message buffers were available.
+ * @retval STATUS_MESSAGE_QUEUE_WAIT_IN_ISR The caller is in an ISR, do not block!
+ * @retval STATUS_TIMEOUT A timeout occured.
+ */
 RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Urgent(
   CORE_message_queue_Control       *the_message_queue,
   const void                       *buffer,
@@ -308,6 +353,12 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Urgent(
   );
 }
 
+/**
+ * @brief Acquires the message queue.
+ *
+ * @param[in, out] the_message_queue Rhe message queue to acquire.
+ * @param queue_context The thread queue context.
+ */
 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Acquire(
   CORE_message_queue_Control *the_message_queue,
   Thread_queue_Context       *queue_context
@@ -316,6 +367,12 @@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Acquire(
   _Thread_queue_Acquire( &the_message_queue->Wait_queue, queue_context );
 }
 
+/**
+ * @brief Acquires the message queue critical.
+ *
+ * @param[in, out] the_message_queue The message queue to acquire critical.
+ * @param queue_context The thread queue context.
+ */
 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Acquire_critical(
   CORE_message_queue_Control *the_message_queue,
   Thread_queue_Context       *queue_context
@@ -324,6 +381,12 @@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Acquire_critical(
   _Thread_queue_Acquire_critical( &the_message_queue->Wait_queue, queue_context );
 }
 
+/**
+ * @brief Releases the message queue.
+ *
+ * @param[in, out] the_message_queue The message queue to release.
+ * @param queue_context The thread queue context.
+ */
 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Release(
   CORE_message_queue_Control *the_message_queue,
   Thread_queue_Context       *queue_context
@@ -333,8 +396,14 @@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Release(
 }
 
 /**
+ * @brief Copies the source message buffer to the destination message buffer.
+ *
  * This routine copies the contents of the source message buffer
  * to the destination message buffer.
+ *
+ * @param source The source message buffer to be copied.
+ * @param[out] destination The destination messag buffer to copy the source to.
+ * @param size The size of the source buffer.
  */
 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer (
   const void *source,
@@ -346,8 +415,15 @@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Copy_buffer (
 }
 
 /**
+ * @brief Allocates a message buffer from the inactive message buffer chain.
+ *
  * This function allocates a message buffer from the inactive
  * message buffer chain.
+ *
+ * @param the_message_queue The message queue to operate upon.
+ *
+ * @retval pointer The allocated message buffer.
+ * @retval NULL The inactive message buffer chain is empty.
  */
 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
 _CORE_message_queue_Allocate_message_buffer (
@@ -359,8 +435,13 @@ _CORE_message_queue_Allocate_message_buffer (
 }
 
 /**
+ * @brief Frees a message buffer to inactive message buffer chain.
+ *
  * This routine frees a message buffer to the inactive
  * message buffer chain.
+ *
+ * @param[in, out] the_message_queue The message queue to free the message buffer to.
+ * @param[out] the_message The message to be freed.
  */
 RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
   CORE_message_queue_Control        *the_message_queue,
@@ -371,8 +452,15 @@ RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
 }
 
 /**
+ * @brief Gets message priority.
+ *
  * This function returns the priority of @a the_message.
  *
+ * @param the_message The message to obtain the priority from.
+ *
+ * @retval priority The priority of this message.
+ * @retval 0 Message priority is disabled.
+ *
  * @note It encapsulates the optional behavior that message priority is
  *       disabled if no API requires it.
  */
@@ -388,8 +476,15 @@ RTEMS_INLINE_ROUTINE int _CORE_message_queue_Get_message_priority (
 }
 
 /**
+ * @brief Gets first message of message queue and removes it.
+ *
  * This function removes the first message from the_message_queue
  * and returns a pointer to it.
+ *
+ * @param[in, out] the_message_queue The message queue to get the first message from.
+ *
+ * @retval pointer The first message if the message queue is not empty.
+ * @retval NULL The message queue is empty.
  */
 RTEMS_INLINE_ROUTINE
   CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
@@ -402,8 +497,15 @@ RTEMS_INLINE_ROUTINE
 
 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
   /**
+   * @brief Checks if notification is enabled.
+   *
    * This function returns true if notification is enabled on this message
    * queue and false otherwise.
+   *
+   * @param the_message_queue The message queue to check if the notification is enabled.
+   *
+   * @retval true Notification is enabled on this message queue.
+   * @retval false Notification is not enabled on this message queue.
    */
   RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_notify_enabled (
     CORE_message_queue_Control *the_message_queue
@@ -414,8 +516,13 @@ RTEMS_INLINE_ROUTINE
 #endif
 
 /**
+ * @brief Initializes notification information.
+ *
  * This routine initializes the notification information for
  * @a the_message_queue.
+ *
+ * @param[out] the_message_queue The message queue to initialize the notification information.
+ * @param[out] the_handler The notification information for the message queue.
  */
 #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION)
   RTEMS_INLINE_ROUTINE void _CORE_message_queue_Set_notify (
@@ -431,6 +538,21 @@ RTEMS_INLINE_ROUTINE
     do { } while ( 0 )
 #endif
 
+/**
+ * @brief Gets the first locked thread waiting to receive and dequeues it.
+ *
+ * This method dequeues the first locked thread waiting to receive a message,
+ *      dequeues it and returns the corresponding Thread_Control.
+ *
+ * @param[in, out] the_message_queue The message queue to operate upon.
+ * @param buffer The buffer that is copied to the threads mutable_object.
+ * @param size The size of the buffer.
+ * @param submit_type Indicates whether the thread should be willing to block in the future.
+ * @param queue_context The thread queue context.
+ *
+ * @retval thread The Thread_Control for the first locked thread, if there is a locked thread.
+ * @retval NULL There are pending messages or no thread waiting to receive.
+ */
 RTEMS_INLINE_ROUTINE Thread_Control *_CORE_message_queue_Dequeue_receiver(
   CORE_message_queue_Control      *the_message_queue,
   const void                      *buffer,



More information about the vc mailing list