Re: extern functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I want the data available to some functions inside the kernel  to be
> available to my modules also. I thought i will generally call some
> extern funct from inside and then define it later from my modules which
> doesnt work. Now i am trying to do it through fucntion pointers which
> are exported so that i can change it in my module. still dont have the
> exact idea to accomplish the task .

Hi devvrat,

i can't understand exactly what you need to do, but maybe a solution can be 
this:  make a global simbol (i.e. a function pointer) that the kernel 
should export.
so, there must be a kernel implementation of that function (also emtpy) 
and a module implementation that could reassign as you like.

few steps,

kernel side:
void* foo_pointer;
EXPORT_SYMBOL( foo_pointer );

foo_pointer = empty_func;

void empty_func(void){};

module side:
include <somthing>
foo_pointer = something_other;

void something_other(void) {
 // a lot of code... :P
}

could it works?

bye!
-- 
-gaspa-
-----------------------------------------------
--------- Powered by Debian GNU/Linux ---------
------ HomePage: iogaspa.altervista.org -------
-Il lunedi'dell'arrampicatore: www.lunedi.org -

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux