On Mon, Oct 01, 2001 at 11:15:59AM -0400, Calin A. Culianu wrote:
> I personally see no drawback to this feature.. it costs nothing in terms
> of code complexity (the data structures for this info are there already)
> and maybe causes like 15 bytes of additional binary bloat. :) (I know,
> kernel memory is so precious.. but well.. 15 bytes that can be optionally
> config'd out hopefully won't kill anyone's computer too badly...)
> 
> >
> >     is not nice enough, then I suggest
> >
> >     RTF_GETSIZE
> >     as an added ioctl.
> >
> 
> Adding an ioctl?  Aren't ioctl's sort of user-space-oriented things?  I
> agree that it might be a nice feature for userland, but are you suggesting
> this in lieu, or in addition to, my proposed functions?  Here is what I
> propose in the kernel (in rt_fifo.c, to be exact).
> 
> int /* returns the total 'bufsize' of FIFO fifo, or errno on error */
> rtf_size(int fifo);
> 
> int /* returns total bytes of available space in FIFO fifo, or errno */
> rtf_bytesfree(int fifo);
> 
> As far as the ioctl functionality.. that's a really good suggestion.  I
> can add that too.. :)

I'd rather see it in ioctl using the POSIX API in RTL. The less
API growth the better.


> 
> >     then send a patch with an optional config option and we'll see
> >     if anyone else uses it.
> 
> Ok...  I will come up with something and send it in.. thanks!! :)

Look forward to it.

> 
> -Calin
> 
> >
> >
> > > if would make me happy if this feature were included.  :)
> > >
> > > -Calin
> > >
> > >
> > > >
> > > >
> > > > On Fri, Sep 28, 2001 at 04:21:45PM -0400, Calin A. Culianu wrote:
> > > > >
> > > > > I realize the tone of my previous this email seems impatient.. it isn't.
> > > > > Actually if you guys would honor me with your approval, I can gladly
> > > > > submit a patch that defines an interface for my proposed solution (a)
> > > > > below, or one that moves the struct definition of struct rtl_fifo_struct
> > > > > over to the more public 'rtl_fifo.h' header file. (Since the kernel symbol
> > > > > rtl_fifos is already exported).
> > > > >
> > > > >
> > > > > Please allow me to be an rt-linux developer!! :)
> > > > >
> > > > > -Calin
> > > > >
> > > > > ---------- Forwarded message ----------
> > > > > Date: Fri, 28 Sep 2001 15:35:38 -0400 (EDT)
> > > > > From: Calin A. Culianu <[EMAIL PROTECTED]>
> > > > > To: [EMAIL PROTECTED]
> > > > > Cc: rtl <[EMAIL PROTECTED]>
> > > > > Subject: RE: [rtl] number of elements in a fifo
> > > > >
> > > > > Well, in kernel mode there's no way to tell how full a fifo is (as of rtl
> > > > > 3.1)!
> > > > >
> > > > > Actually, that macro only occurs in rtl_fifo.c, and furthermore, the
> > > > > exported kernel symbol "rtl_fifos" that the macro really uses is of
> > > > > type struct rt_fifo_struct, which is a private type inside rtl_fifo.c!
> > > > >
> > > > > Why is kernel symbol 'rtl_fifos' exported when its type is private?
> > > > > It aggravates me!!
> > > > >
> > > > > Can someone on the rt-linux dev team either kindly:
> > > > >
> > > > > a) create a public interface to find out the size and/or the bytes free in
> > > > > an rtf (this is trivial, just make a function that returns
> > > > > rtl_fifos[minor].bufsize, rtl_fifos[minor].len etc).
> > > > >
> > > > > OR
> > > > >
> > > > > b) make struct rtl_fifo_struct a public struct???? (since the array of
> > > > > fifos is exported into the kernel symbol table anyway).
> > > > >
> > > > > -Calin
> > > > >
> > > > > On Fri, 21 Sep 2001, stuart warren wrote:
> > > > >
> > > > > > To read how full the fifo is from userspace...
> > > > > >
> > > > > >     int bytes_in_fifo;
> > > > > >     ioctl(rtfifo_fd, FIONREAD, &bytes_in_fifo);
> > > > > >
> > > > > > In the kernel you can use...
> > > > > >
> > > > > >     bytes_in_fifo = RTF_LEN(fifo_number);
> > > > > >
> > > > > > Cheers,
> > > > > > Stuart
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: fred august [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Thursday, 20 September 2001 6:00
> > > > > > To: rtl
> > > > > > Subject: [rtl] number of elements in a fifo
> > > > > >
> > > > > >
> > > > > > Hi,
> > > > > >      is there a simple way to know how many elements
> > > > > > are in a FIFO? This should be in RT, or almost, for a
> > > > > > FIFO between a RT thread and a user space one. I need
> > > > > > this information in order to dump some of the elements
> > > > > > if the FIFO is too full.
> > > > > >
> > > > > > thanks
> > > > > >
> > > > > > f
> > > > > >
> > > > > > ______________________________________________________________________
> > > > > > Do You Yahoo!?
> > > > > > Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it
> > > > > >
> > > > > > -- [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/
> > > > > >
> > > > > > -- [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/
> > > > > >
> > > > >
> > > > >
> > > > > -- [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/
> > > >
> > > > -- [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/
> > > >
> > >
> > > -- [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/
> > -- [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/
> >
> 
> -- [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/
-- [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