MHD.Tayseer Alquoatli wrote:
On 5/11/06, *Christian Boon* <c.boon@xxxxxxxxxxxxxxxxxxxx
<mailto:c.boon@xxxxxxxxxxxxxxxxxxxx>> wrote:
Hi,
i know it is possible with an ioctl to change a value in a kernel
module.
Is it possible to let a kernel module change a value in user space
when
some kind of error occurs?
this situation is best implemented using sysfs attribute (file)
but your user space application has to check (read) this file
so that i dont need to check 'if' an error occured.
you are seeking something like a callback function that will be called
when a certain event occurs .. i don't know a native implementation to
this feature
you can check for errors by ioctl, reading from device file, reading
from sysfs file, implementing a netlink socket .. but in all cases
your user space application has to make an action (even doing a listen
or read from a socket)
please let me know if such a callback exist
people CMIIW please
hope this helps
But what about setting a userspace pointer with an ioctl and then use
that pointer with put_user to change a value?
Or isnt that the right way to do it?
Christian.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/