Emeel wrote:

> i have not yet worked out how the data is transfered from the fifos that
> were written to in the thread code to the files /dev/rtfx... that were
> printed out in the end.
> can anyone please let me know?
> 
> thanks in advance.
> 

Hi Emeel,

What is actually happing is that the rtf device driver stores a copy of
the data written by the rtf_put in a buffer for the /dev/rtfx (minor
node) actually.  There is not real file involved, just the special
device inode.  Roughly, when the user code calls read, a trap to kernel
space is made, and the driver associated with rtfx is called, at this
point the data stored in the per-fifo buffer is copied to the user space
programs buffer referenced by the read call, on return from the kernel
the user buffer will have the fifo data available for printing.

Take a look at Linux device drivers by Alessandro Rubini, this gives a
clear picture of kernel drivers (although a bit out of date wrt current
kernel versions, I think a second edition should be out 'real soon')

Regards, Stuart

-- [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