From 7bec8d0a9a750b72b5a788e1cd693a87f7817de3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 6 Jun 2008 20:55:21 +0000 Subject: 2008-06-06 Joel Sherrill * started/buildc.t: Add paragraph on see CVS for latest patches. * user/conf.t: Add CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE and example of how to compute message CONFIGURE_MESSAGE_BUFFER_MEMORY using it. --- doc/user/conf.t | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'doc/user/conf.t') diff --git a/doc/user/conf.t b/doc/user/conf.t index aab3ca6109..aeb79e390d 100644 --- a/doc/user/conf.t +++ b/doc/user/conf.t @@ -256,11 +256,44 @@ TRUE, the Workspace is zeroed. Otherwise, it is not. Unless overridden by the BSP, the default value for this field is FALSE. +@findex CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE +@item @code{CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE} is a helper macro +which is used to assist in computing the total amount of memory +required for message buffers. Each message queue will have its +own configuration with maximum message size and maximum number of +pending messages. The interface for this macro is as follows: + +@example +CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(max_messages, size_per) +@end example + +Where @code{max_messages} is the maximum number of pending messages +and @code{size_per} is the size in bytes of the user message. + @findex CONFIGURE_MESSAGE_BUFFER_MEMORY @item @code{CONFIGURE_MESSAGE_BUFFER_MEMORY} is set to the number of bytes the application requires to be reserved for pending message queue buffers. This value should include memory for all buffers across -all APIs. The default value is 0. +all APIs. The default value is 0. + +The following illustrates how the help macro +@code{CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE} can be used to assist in +calculating the message buffer memory required. In this example, there +are two message queues used in this application. The first message +queue has maximum of 24 pending messages with the message structure +defined by the type @code{one_message_type}. The other message queue +has maximum of 500 pending messages with the message structure defined +by the type @code{other_message_type}. + +@example + +#define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE \ + (CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \ + 24, sizeof(one_message_type) + \ + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \ + 500, sizeof(other_message_type) \ + ) +@end example @findex CONFIGURE_MEMORY_OVERHEAD @item @code{CONFIGURE_MEMORY_OVERHEAD} is set to the number of -- cgit v1.2.3