RTEMS Message Queue Behaviour

Joel Sherrill joel.sherrill at OARcorp.com
Fri Apr 9 12:23:49 UTC 2010


On 04/09/2010 05:10 AM, Aleix Conchillo Flaqué wrote:
> A while ago I experienced strange problems with queues until I
> configured the memory for them. In 4.6.6 CONFIGURE_MEMORY_OVERHEAD
> defines the number of  kbytes necessary to fit your queue messages and
> CONFIGURE_MESSAGE_BUFFER_MEMORY for newer RTEMS versions. Buffers are
> not taken into account when reserving memory for message queues.
>    
If you don't have enough memory in the workspace,
this should result in an out of memory error on the queue
create.  Memory is not allocated for messages on the
fly.

--joel
> Hope it helps,
>
> Aleix
>
> On Fri, Apr 9, 2010 at 11:56, Jamie Bowman
> <jamie.bowman at steepestascent.com>  wrote:
>    
>> All
>>
>>
>>
>> I am experiencing some strange behaviour with RTEMS message queues, although
>> I suspect the problem may more to be with the main configuration of the
>> application.
>>
>>
>>
>> I have a multi-threaded system, with a central logging thread. Information
>> is sent from each thread to the logging thread via a single logging thread
>> message queue. At the moment the logging thread simply uses a printf to
>> output the messages it receives. The behaviour we are seeing though is that
>> the logging thread is in a certain instances reading the messages out of the
>> queue in the wrong order and it also seems that some messages are going
>> missing all together. Monitoring the return of the rtems_message_queue_send
>> does not seem to reveal any issues with RTEMS_SUCCESSFUL returned every
>> time. An example of what I am seeing is as follows:
>>
>>
>>
>> Sent: Message 1
>>
>> Sent: Message 2
>>
>> Sent: Message 3
>>
>> Sent: Message 4
>>
>> Sent: Message 5
>>
>> Sent: Message 6
>>
>> Sent: Message 7
>>
>>
>>
>>              LOGGING THREAD
>>
>> Read: Message 1
>>
>> Read: Message 2
>>
>> Read: Message 4
>>
>> Read: Message 3
>>
>> Read: Message 5
>>
>>
>>
>> Messages 3 and 4 are out of order and 6 and 7 never seem to get through.
>>
>>
>>
>> Does anyone have any ideas as to why this may be happening? I am using RTEMS
>> 4.8.1.
>>
>>
>>
>> Kind regards
>>
>>
>>
>>              Jamie
>>
>>
>>
>>
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>>
>>
>>      
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>    




More information about the users mailing list