rtf_open_sized blocks

Alexander Fedtke ubf at gmx.net
Thu Oct 28 11:58:09 CEST 2004


Btw: rtai-3.1/rtai-testsuite/user/preempt/preempt.c shows the use of
rtf_create() in user/lxrt space! Is this correct?? According the
documentation this must be used in kernel space only...

Why is there a call for rtf_create() AND open() ??

rtf_create(FIFO, 1000);
if ((fifo = open(rtf_getfifobyminor(0,nm,sizeof(nm)), O_RDWR)) < 0) {
   printf("ERROR OPENING FIFO %s\n",nm);
   exit(1);
}

> Hi!
> 
> rtf_open_sized() blocks my lxrt task when the fifo is already opened by a
> plain linux process for blocking read.
> 
> cat /proc/rtai/fifos shows that the linux task has opened the rtf with
> size
> of 1000 bytes allocated by kmalloc (used by 1 resource)
> When starting the lxrt task (that calls rtf_open_sized with size of
> 1.000.000) the fifo resource counter is incremented, but size and
> [k|v]malloc is not changed (lxrt task blocks).
> When killing my lxrt task (by pressing CTRL-C) the fifo recource counter
> will be decremented correctly.
> When restarting my lxrt application everything works fine: resource
> counter
> is incremented, size is adapted and "kmalloc" is replaced by "vmalloc"
> 
> What can I do to get rtf_open_sized() working even on first start of the
> lxrt application.
> BTW: simply starting the linux task after the lxrt task works but is not
> acceptable for my application
> 
> Thanks in advance, Alexander
> 
> -- 
> Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD
> ++++ Jetzt anmelden und testen http://www.gmx.net/de/go/mail ++++
> 
> 
> _______________________________________________
> RTAI mailing list
> RTAI at rtai.org
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
> 

-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!





More information about the Rtai mailing list