On Fri, Mar 02, 2001 at 09:36:00AM +0100, Olaf Petzold wrote:
> never called imo:
> 
> int rtfHandler(size_t fifo)
> {
>       size_t sz;
>       const char *msg = "Hallo World\n";
>       sz = strlen(msg);
>       rtf_put(number(), &sz, sizeof(sz));
>       rtf_put(number(), (void*)msg, sz);
>       return 0;
> }
> 
> The first read op from user space should call the handler above. It puts at
> first the stringlength and then the string self. On each call the rtf buffer is
> filled with the same string. I'm on a wrong way ?

        It looks right, but I'll double-check it when I get some free time.

> Is it really neccessary ? man page says:
> 
> rtf_create_handler  installs  a  handler which is executed when data is written
> to or read from a real-time fifo  (RT-FIFO).   fifo is an RT-FIFO that must
> have previously been created with a call to rtf_create.   handler   is       
> then called whenever a Linux process accesses that fifo.

        "accesses" is a bit vague.  For instance, is a call to poll() on that
device an "access"?  On the other hand, "when data is written to or read from"
could easily be interpreted as not calling the FIFO handler when the FIFO is
empty and something tries to read from it, because no data will be read from
the FIFO.  I will have to look into getting the docs changed, one way or 
another.
-- [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