linux驱动与应用程序进行交互
linux驱动里面的中断程序,里面可能需要通知应用程序,通常的做法是,使用fasync和netlink。
使用fasync比较简单,是file_operation本来就支持的机制。一下,两篇博客有详细介绍,简单来说就是:在应用程序中,指定进程,和回调函数,在内核中断服务函数中,向应用程序发送SINGIO,通知应用程序。
以下两篇博客介绍非常详细:
https://blog.csdn.net/kingdragonfly120/article/details/10858647
https://blog.csdn.net/coding__madman/article/details/51851338