#define THIS_MODULE - related query ?

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

 



hi ,
           but the question still remains - how does THIS_MODULE convert
itself into the struct module * of the module where
           it is declared ?  .

          #define THIS_MODULE (&__this_module).  /* from
<linux/module.h> */



          int init_module (void)
        {
                struct module *mine = THIS_MODULE ;
                ......
         }

could someone explain ?

cheers,
Amith



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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