[EMAIL PROTECTED] wrote:
> 
> Is anyone on this list have an idea of how i can know that a fifo is full, 
> without having to write in this fifo, and, if possible, without having to
> modify the rtlinux sources.

If you write PIPE_BUF bytes or less at a time, and you set O_NONBLOCK,
then write() will return -1 without writing anything if there isn't 
enough room. Of course, if your messages are larger than PIPE_BUF, 
the fifo will always be full.
See also: http://fsmlabs.com/developers/docs/html/susv2/xsh/write.html

I believe you can use fstat on the read end of a fifo. I don't know
if there is a possibility to retrieve the number bytes that can be
written without blocking. You have to try.

Regards,
Theo
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to