On Tue, Jul 25, 2000 at 05:25:40PM -0600, [EMAIL PROTECTED] wrote:
> On Tue, Jul 25, 2000 at 02:07:20PM -0700, David Schleef wrote:
> > Why don't you just use a Linux-like void *dev_id?  Is it the
> > migration difficulties in changing function prototypes, or is there
> > some fundamental reason?  The lack of a callback handle really makes
> > writing correct drivers a pain.
> 
> sigaction provides the irq# -- so if you want that information, use the 
> sigaction interface.  I'd rather make the RTLinux environment
> look like Posix threads than like the interior of the Linux kernel.
> The interior Linux kernel is much more complex, much less familiar, and
> guaranteed to be not stable. I think it is a fundamental error to use
> Linux internal operations as an API.

I agree about the inherint long-term stability of Linux interfaces
(except that the irq prototype hasn't been changed since 1.1.17.)
But not having Linux-like interfaces available means that it is much
more difficult to port drivers from Linux to RTLinux.


> But I don't see the problem even with the rtl_request_irq interface.
> After all, it is a one line function to provide the functionality 
> you want. Am I missing something? Maybe you can give me an example.

It takes about 30 lines to get dev_id functionality.  The irq
number has to be converted to a dev_id using a lookup table,
which means that you have to have functions to add/remove entries
to/from the lookup table as well as the ISR wrapper.  Even with
this, you can't share interrupts because the irq is not unique.

If you want the full cruft, look at the comedi source.  Note that
the RTL V1 prototype (void isr(void)) makes it completely
impossible to have multiple devices using the same driver.

I don't really care whether or not RTLinux supports dev_id,
since the code in Comedi works as it is.  I just copy the same
code to new projects as necessary.




dave...


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