Aleksandar Bakic wrote:
> 
> 
> static int nic_irq;
> static void pend_nic_interrupt(void)
>   {
>     rt_pend_linux_irq(nic_irq);
>   }
> void request_nic_irq(int irq)
>   {
>     nic_irq = irq;
>     rt_free_global_irq(nic_irq);
>     rt_request_global_irq(nic_irq, pend_nic_interrupt);
>   }

Hi,

 At first, if nic_irq is not used by a RT_irq_handler, you do not need
rt_free_global.
Then after rt_request_global_irq , you have to do rt_enable_irq(nic_irq)
to enble it.
It should work correctly ...
The code appears correct unless the rt_enable_irq(irq).
Carefull if you use it on a SMP machine, cause the irq is get
simultanously on all CPU ! so
I use to attach the irq on one CPU against global to avoid multiple
instances.

Chris.

--
Kumsta Christophe
<[EMAIL PROTECTED]>
Real-Time System developper
RT-Linux/RTAI ( Use the Source Luck !)
--- [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