Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Calling own function defined in kernel module

    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 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?

    Please respond.

    Thanks and Regards,

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts