On Mon, Mar 13, 2000 at 10:28:30AM -0500, Paul Koning wrote:
> I was looking at the rtl_fifo.c code and something struck me...  If
> you write to /dev/rtf<n>, you can specify any length you like,
> including one longer than the fifo buffer size.  Fine, the user
> process stalls in mid-write until the real time thread makes more
> room, then continues, repeating until the write count has been
> satisfied.
> 
> The question: it seems likely that a real time thread will be using
> the rtf handler mechanism to trigger reading from the fifo.  Normally
> that's not a problem, but in the case I mentioned the handler isn't
> invoked until the write is done.  That's consistent... but it means
> that you may have a deadlock.
> 
> Even though it's slightly inconsistent, it seems appropriate for this
> situation to call the handler when the user process is about to be
> stalled due to lack of room.

Seems reasonable. Since user fifo writes are streams of bytes ...

I'd like to fold fifos into the POSIX mq. Fifos would still be files
on the user side, but would be message queues on the RT side. 
Then if there is a structure, mq_recv on RT side will simply fail
if a partial message structure is there.
My idea is to extend so that mq_recv(md,&x,n*msize) can be used to read
"n" messages. For standard fifos, message size is 1, and things will
still work the same.


> 
>       paul
> -- [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/~rtlinux/

-- 
---------------------------------------------------------
Victor Yodaiken 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

-- [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/~rtlinux/

Reply via email to