userspace notification from module
Hi List!
My name is Bartłomiej Zimoń.
Need some clue to find solution for above topic.
Have written small kernel module to notify userspace about couple events.
The problem is to choose proper way to send data to userspace.
Use inotify from userspace could be interesting for such data,
but looks like sysfs/procfs doesn't send signal about data changed in file or maybe i'm wrong?
If sysfs/procfs is wrong for that so must create device file, but here secound problem how to notify that file/buffer has new data?
Please give me some light for such case.
Links to working solutions are also good.
Thanks in advice.
Bartłomiej Zimoń
PLD Linux devel, Kadu Team devel
Hi Bartłomiej,
Quoted 5 lines · Bartłomiej Zimoń
Use inotify from userspace could be interesting for such data,
but looks like sysfs/procfs doesn't send signal about data changed in file or maybe i'm wrong?If sysfs/procfs is wrong for that so must create device file, but here secound problem how to notify that file/buffer has new data?
Actually, the file content of a procfs file is volatile and generated on the fly, just have a look at some device drivers or at the API.
Did you have a look at the netlink protocol for communication from kernel to userspace?
Cheers,
Daniel