Is it possible in linux to register a interrupt handler from any user-space program?

此生再无相见时 提交于 2019-12-24 09:02:25

问题


I am studying about Linux Interrupt handling mechanism, just got doubt whether registering an interrupt handler from user-space is allowed or not?


回答1:


No, interrupts are registered in the kernel and a driver / module must be loaded into kernel space to receive the interrupt. It could pass handling onto a user space daemon that hooks into the kernel module, but the something must be inserted into the kernel.




回答2:


Cannot register user space interrupt handler directly.

Kernel ISR indicates interrupt by writing file / setting register / signalling. User space application polls this and goes on with the appropriate code.

Linux file abstraction is used to connect kernel and user space. This is mostly performed by character devices and ioctl() calls.

https://stackoverflow.com/a/47776006/5349798



来源:https://stackoverflow.com/questions/15407718/is-it-possible-in-linux-to-register-a-interrupt-handler-from-any-user-space-prog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!