Thanks for explanation Sriman but I got a little confused here, if someone can point to a piece of code where this is being used that will be great to look at and to understand.
On Wed, Jun 30, 2010 at 10:49 PM, S R I M A N . M <[email protected]>wrote: > You can use the function pointers for this. > > for example: if module A has the function need to called by B. Insert the > module A first and declare the extern for these functions in module B. To > solve the problem of calling module B functions from Module A we can use the > function pointers as explained below. > > write a function in the module A which has the code to update function > pointers (these are pointers to module B functions called by module A) given > by module B later. Call the A's update function pointers function with the > array of functions of B so that the module A will have the pointers to > function in B and can call them in runtime. > > either way you can do it. functions in second inserted module has to be > updated to the first inserted module so that the first inserted module can > call them. > > Hope this is clear. > > Thanks, > Sriman > > On Thu, Jul 1, 2010 at 9:55 AM, Mulyadi Santosa <[email protected] > > wrote: > >> On Wed, Jun 30, 2010 at 15:34, devendra dev <[email protected]> >> wrote: >> > hi to all >> > this is dev >> > i had a module called module1 which calls the function which is exported >> by >> > another module called module2 and the module2 calls a function which is >> > exported by module1. When i perform insmod module1.ko and insmod >> module2.ko >> > those are saying error:unknown symbol in module. do any one know answer >> pls >> > suggest >> > thanks >> > dev. >> >> So A depends on B and vice versa? wonder how modprobe and depmod will >> act on that situation... >> >> but anyway, have you declare the function name in each module as >> "extern"? such as it originates in A, and in B you name "extern >> blahblah"? >> >> -- >> regards, >> >> Mulyadi Santosa >> Freelance Linux trainer and consultant >> >> blog: the-hydra.blogspot.com >> training: mulyaditraining.blogspot.com >> >> -- >> To unsubscribe from this list: send an email with >> "unsubscribe kernelnewbies" to [email protected] >> Please read the FAQ at http://kernelnewbies.org/FAQ >> >> > > > -- > Thank You, > శ్రీమన్ మిర్యాల >
