[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
long user writes to rtl fifos
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.
paul