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/

Reply via email to