How to call functions and variables from the kernel module (A) in the kernel module (B), and then send a notification to user space?

I am developing an application (user space) that sends notifications of changes in values ​​across a network.

I want to develop a kernel module (A) to notify my application (user space) if a value changes in a parameter in another kernel module (B).

  • How to send a signal from the kernel module (A) to my user space application?
  • How to send data from kernel module (A) to my user space application?
  • How to call functions and variables from the kernel module (A) in the kernel module (B)?
+5
source share
1 answer

Access to module B from module A

B, C-, /, A , , , #include A.

B :

EXPORT_SYMBOL(your_symbol);

/.

Makefile A , Module.symvers of B KBUILD_EXTRA_SYMBOLS, , ​​ CONFIG_MODVERSIONS

, . Linux (RTAI) , , , , Linux. ( ) ( ) . ​​ Linux, .

(, , ), /sys /proc, 0/1, , . .

+2

All Articles