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/