Interrupt Catching
In the network driver responsible for interacting with your NIC registers,You will find a interrupt handler that is registered with the kernel.
request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *dev_name,
void *dev_id)
irq--->interrupt no.
irqreturn_t (*handler)(int, void *, struct pt_regs *)--->Handler routine
unsigned long flags-->flags saying whether it is shared or fast or something more,etc.
const char *dev_name-->owner of interrupts(Entry in /proc/interrupts)
void *dev_id--> If interrupts are shared then it matters.
So the main thing is that once you registered a handler in your driver code this handler will be invoked by the kernel when it receives the interrupt on that no. For better understanding google
|