Nicolai Hanssing wrote:
>
> First off, Michael thanks for your answers.
>
> > > By atomic, I mean non-divideble - i.e. You put something of size 30B in
> > > RTFx from userspace, and when the handler get woken theres 30B in the RTFx.
> >
> > Kernel rtf_put and user-space write are atomic in this sense.
> > rtf_get or a user-space read may return with less data than requested
> > if there's not enough data in the FIFO.
>
> Thats not really my question, I'll try again:
> If a userspace task only writes blocks of 30 bytes to an RTF-fifo, and the
> rtl taks reads blocks of 30 bytes, can the task then return a read with
> less than 30 bytes?
> I.e. are the data from the userspace "committed" to
> the fifo partly ?
> Also of intrest: When is the rtf-handler woken?
> At the end of operations
> on the fifo - bucause that would gice the false effect of an atomic fifo,
> allthough it might not be.
>
I had a similar problem here. My device can slow down
it's data stream, given early enough warning. What I need is
a way to detect a 'nearly empty' FIFO. I solved it by adding
this function to rtl_fifo.c :
int rtf_size(unsigned int minor)
{
return RTF_LEN(minor);
}
Obviously, this is a dirty hack. Is there an official
way to get the fill size of a FIFO?
Or a good reason why not?
Have a nice day.
Iwo
----- End of forwarded message from [EMAIL PROTECTED] -----
-- [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/