On Mon, 2006-09-11 at 15:29 -0500, Jeff Webb wrote:
> Philippe Gerum wrote:
> > The following patch against stock 2.2.2 improves the RTAI fifo
> > emulation. It reduces the overhead induced by sending highly scattered
> > data over a short period of time, and basically provides a much saner
> > implementation.
> >
> > I'd be interested to have some feedback about this; I plan to change the
> > data streaming mode of message pipes from the native API the same way.
> > TIA,
>
> I applied this patch on my linux-2.6 and 2.4 systems. The simple
> 'fifotestk.c' example I posted now works fine, with no apparent memory leaks.
> I can now allocate a 128 MB RTAI FIFO, which sure beats 100 KB! Thanks for
> the fix!
>
> If I try to allocate a FIFO larger than the available vmalloc space, the
> rtf_create routine now fails with ENOMEM, which is much better than failing
> on the rtf_put call. Unfortunately, the RT-FIFO device is now EBUSY forever.
> I can switch to another device, and I can allocate space for my 128 MB FIFO
> once again, so that is good, at least. Here is the printk output from my
> program:
>
Mm, ok, I see: brain cell shortage on my side, hopefully temporary.
Please try the attached patch on top of the previous one.
--- ksrc/skins/rtai/fifo.c (revision 1580)
+++ ksrc/skins/rtai/fifo.c (working copy)
@@ -134,7 +134,7 @@
xnlock_get_irqsave(&nklock, s);
if (buffer == NULL) {
- if (!err)
+ if (err >= 0)
/* First open, we need to disconnect upon
* error. Caveat: we still hold the lock while
* flushing the message pipe's input and
--
Philippe.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help