#4007 assigned enhancement

Add rtems_message_queue_build()

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 6.1
Component: rtems Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

In RTEMS 5 a lot of development was done to allow a static allocation of resources provided by RTEMS and avoid the use of a heap. Similar to #3959 a new directive to build Classic API message queues without using the workspace is proposed:

/**
 * @brief The message queue configuration to build a message queue.
 */
typedef struct {
  /**
   * @brief The name of the message queue.
   */
  rtems_name name;

  /**
   * @brief The count of the provided buffers.
   *
   * This value defines the maximum number of pending messages.
   */
  size_t buffer_count;

  /**
   * @brief The size of the provided buffers in bytes.
   */
  size_t buffer_size;

  /**
   * @brief The array of count message buffers.
   *
   * Each buffer shall have the size of the buffer_size member.  The maximum
   * message size is buffer_size minus sizeof( rtems_message_queue_buffer ).
   */
  rtems_message_queue_buffer *buffers;

  /**
   * @brief The attribute set of the message queue.
   */
  rtems_attribute attribute_set;
} rtems_message_queue_config;

/**
 * @brief Builds a message queue according to the specified configuration.
 *
 * @param config The message queue configuration.
 * @param[out] id The message queue identifier of the new message queue.
 *
 * @retval RTEMS_SUCCESSFUL Successful operation.
 * @retval RTEMS_INVALID_ADDRESS The id parameter is @c NULL.
 * @retval RTEMS_INVALID_NAME The message queue name is invalid.
 * @retval RTEMS_TOO_MANY No message queue is available.
 */
rtems_status_code rtems_message_queue_build(
  const rtems_message_queue_config *config,
  rtems_id                         *id
);

Change History (0)

Note: See TracTickets for help on using tickets.