[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rtl] RT FIFOs and select system call.



Hi Laurent,

I noticed the other day that if I did a (rtl 3.0 pre6d)

	ioctl(fifo_fd, FIONREAD, unread);

it would work okay until I emptied the fifo but after that (and after
some more data accumulated in the fifo), it would continue to return 0.

I haven't looked through the fifo code but it sounds similar to what you
are experiencing with RAT.

cheers,

Stuart Warren

Laurent.Kersten@alcatel.be wrote:
> 
> Hello,
> 
> I've found a "undocumented feature" in the RTAI fifos  (new fifos (both version 0.9a and 1.5)). We are unable to perform a select system call from a user-space program (actually this is a TCL script that use the filevent TCL feature, but if you look
> through strace you can actually see that this is a call to select with a filedescriptor corresponding to the FIFO). Although the real-time process perform a write on the FIFO, the user-space process doesn't wake-up. We observed that it sleeps on the select
> system call.
> 
> The only work-around we had, is to have a separate user-space process that does a blocking read on the RT-FIFO and then we something is written, reads the RT-FIFO and rewrite the information on named pipe on which the script is now sleeping. This works
> but, it's not very elegant and it wastes CPU power.
> 
> Thanks for your help.
> 
> Laurent Kersten
> 
> Alcatel Bell Space N.V.
> Berkenrodelei 33
> B-2660 Hoboken.
> Tel :     00-32-3-829.54.09
> Fax :     00-32-3-829.57.63
> 
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/