Manoj Apte wrote:
> 
> If you write a realtime ethernet driver, will  non-rt tasks (linux user
> level tasks) also use the same driver to send messages?

That depends on how you write the driver. With RTL beta12 or 13, you'd
probably want to use the RTL POSIX I/O layer for RTL tasks. The driver
will NOT automatically be visible to user space applications.

If you want the driver to be usable from RTL as well as from user space,
you could implement standard Linux file_operations calls as well, and
make sure they don't collide with the rtl_file_operations calls... The
advantage is that you have full control and the fastest possible code
(no context checks), but you have to duplicate large parts of the
driver; one RTL part and one standard Linux part. Timing critical
interrupt handlers should always run under RTL, of course... You MUST
use RTL spinlocks or rtl_critical()/rtl_end_critical(), as the standard
Linux spin_lock_irqsave() and spin_unlock_irqrestore() WILL NOT
disable/enable RTL interrupts.

You could also use my Driver Programming Interface, but it's still more
like a proof of concept than an actual driver porting/programming
toolkit. It lacks the headers that will let you use the standard Linux
kernel call syntax, and select "RTL only"/"Linux only"/"context
sensitive" at compile time. Currently, you have to use the provided
rtd_XXX() calls/macros in place of the standard kernel ones, but they're
mostly prototype compatible at source level. (Compare the included
es1370 driver to the original in drivers/sound/ to see what needs to be
changed.)

> In that case, the
> QoS cant be satisfied anyway. The driver will have to be modified
> significantly to include priority queues, with a best effort queue for
> non-rt tasks.

Seems that you'll have some extra work to do there anyway, and as the
DPI will have changed a lot before the first stable release (0.2.0),
you're probably better off adding an RTL POSIX I/O interface to the
existing driver.

You could look at the DPI for some ideas about how to solve the
Linux/RTL sync problems, but keep in mind that it's the first release,
and I haven't had much time to check all details. It seems stable on my
machine, though...

Download the DPI from:
        http://www.audiality.com/or/audiality/download.html

You can also find some interesting code in David Schleef's Comedi (AD/DA
card drivers), in rtl_printf(), in the RTL FIFO module, and some other
places.


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