Sending data from kernel to user space
What is the simplest way to send data from kernel to user-space?
Is it possible to use the read system call in the user space program? If yes, please explain how to do so. Thanks!! |
Hi,
What are you exactly trying to achieve? May be these system calls are what you looking for:- Quote:
Regards. |
Hi,
Thanks for your help! I want the user to read data only when something is written by the kernel module. Is it possible to achieve this kind of synchronisation between the user-space program and the kernel module? |
Well, that's possible and that's exactly where I'd use the above mentioned system calls. In the kernel module, in the reader part, use the call copy_to_user() and in the writer, use copy_from_user().
Regards. |
All times are GMT -5. The time now is 09:10 PM. |