a. I would suggest you look at uevents. They are used in android for various purposes. You can see them being used in vold to know when disks are added. You could also look in to the netlink API, which can give a duplex channel between userland and kernel. There are various other options (e.g. /sys files, /proc files, ioctl). A quick google search should sort you out.

b. <this question is better suited to one of the android userland mailing lists>. You could use a file in /etc using any config file library. You could use the property system. You could use a database (there are plenty of uses of sqlite databases in android). Any method that works on linux should work fine on android.


On 27/06/12 16:35, Ventanas wrote:
Hi  all,
I would like to develop a service in Android that will interact with a kernel device driver implemented by me so as this is my first time I am wondering how to implement these two things:

a.I need to callback from the driver a user-space function in the deamon user-space thread or send an event to a user-space thread. what is the preferred way in Android to allow asynchronous communication between kernel driver and a user space thread?

b.I need to permanently load/store parameters/configurations for that Android service/deamon. what is the preferred way to do that? for example: getprop/setprop? Do I have to store parameters in a .prop file?


Marco

--
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

--
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to