Results 1 to 2 of 2
Hi all, I just started studying about kernel modules. One query i'm not able to resolve how i can use/call any of my function(take example testfunc() ) defined in my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-23-2009 #1
- Join Date
- Jan 2009
Calling own function defined in kernel module
I just started studying about kernel modules. One query i'm not able to resolve how i can use/call any of my function(take example testfunc() ) defined in my loadable kernel module (take example : test.ko)
Consider i have insmoded test.ko, now i'm writing any program on my linux machine and i want to use or call testfunc() in my program in userspace, and i don't want to call testfunc() at loading of test.ko (because there is way of calling it from init_module()), i want to call it from my program afterwards then how i should do this or is it possible or not?
Thanks and Regards,
- 11-05-2009 #2
- Join Date
- Oct 2009
Hi.. Im not a professional in writing device drivers in linux. But I know that if you wnt to call any of ur functions. u have to call through ur open, read, ioctl calls from userspace.
My suggestion is to use the ioctl call.