On Thu, 14 Sep 2000 [EMAIL PROTECTED] wrote:

> > service several interrupts. Quite common case when using some kind of
> > wrappers, etc. Having "device id" is a requirement. It was not present in
> > Linux initially, but soon people understood its usefulness.
> 
>        
> low_level_handler_installed_by_request_irq:
>           general_handler(devname);
>           return;
> 
> Is that a problem?

Yes. In low_level_handler_installed_by_request_irq I have no way to get
devname. We are talking about fully dynamic situations. Like I have two
identical cards, I want to use the same driver. At compile time I do not know
if I will install 1 or 5 interrupt handlers and for which devices. I also do
not know the names at compile time.

Or should I use:

switch(irq) {
        case 5:
                install low_level_handler_5;
                break;
        case 7:
                install low_level_handler_7;
etc...
} ?

Solution I would use now is to reproduce Linux 1.2 with an array of 16 "irq
structures". I get IRQ number from some register as you have suggested, and
get all other data from my table indexed by IRQ.

Best regards,
--
Tomek

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