All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] rt_queue_alloc and ways to manage queue overruns
@ 2008-05-05 22:41 Karch, Joshua
  2008-05-06  7:46 ` Philippe Gerum
  0 siblings, 1 reply; 5+ messages in thread
From: Karch, Joshua @ 2008-05-05 22:41 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]


Hello,

I have tasks that normally run at 50 Hz dealing with serial ports.    I have a command task which sends queue messages to a receive task that communicates with the serial port. The receive task waits indefinitely for a message over rt_queue (with TM_INFINITE) and then proceeds to write to the serial port, then reads a response from the RT serial port.  Occasionally, the device on the receiving end of the port takes longer than the expected 20 msec,( 50Hz response) as I've set the RTSER CONFIG struct to look for a 100 msec timeout.  As a result, the number of queued messages quickly build up.  After that, I run out of allocation space with rt_queue_alloc.

Is there some way to check to make sure I am receiving the most current message, and if not, flush all of the queued up messages with rt_queue_free so I can send the latest data to the serial port and not encounter message "buffer" overruns? With the exception of datalogging to disk, I'm very interested in getting to the most current message in a timely manner.


Thank you,
Joshua Karch




[-- Attachment #2: Type: text/html, Size: 1562 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-07 18:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 22:41 [Xenomai-help] rt_queue_alloc and ways to manage queue overruns Karch, Joshua
2008-05-06  7:46 ` Philippe Gerum
2008-05-06 14:02   ` Karch, Joshua
2008-05-07 17:11     ` Philippe Gerum
2008-05-07 18:07       ` Karch, Joshua

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.