RTEMS Message Queue Behaviour

Jamie Bowman jamie.bowman at steepestascent.com
Fri Apr 9 09:56:12 UTC 2010


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

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20100409/9e3b947b/attachment.html>


More information about the users mailing list