The difference between request_irq and __interrupt

From what I'm reading, both are used to register interrupt handlers. I saw many request_irq calls in the kernel code, but not even one __interrupt call. Is __interrupt any way to register a handler from user space?

+4
source share
2 answers

request_irq is essentially a call to the request_threaded_irq shell, which allocates IRQ resources and allows IRQ. This is rephrased from the comment block in kernel/irq/manage.c , Line # 1239 .

Basically, you want to use request_irq if you need to configure interrupt handling for any device. Make sure that any subsystem you are running does not yet provide a wrapper for request_irq . If you are working with a device driver, consider using the devm_* family of calls to automatically control minutes, for example, freeing unused variables, etc. See devm_request_threaded_irq in Line No. 29 in kernel/irq/devres.c for a better explanation. Its equivalent call (and the one you are most likely using) is devm_request_irq .

+6
source

As far as I remember, __interrupt () is used to declare a function as an ISR in user space. I'm not sure where I got this, but I will get back to you as soon as I find a place.

0
source

All Articles