Re: How to understand the macro __init?

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

 



Hi,

On Tue, Aug 14, 2012 at 9:34 AM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> Hi.. :)
>
> On Tue, Aug 14, 2012 at 9:14 AM, 王哲 <wangzhe5004@xxxxxxxxx> wrote:
>> i use the __init for function print_k.
>> in my opinion  after the fisrt invoking the print_k in the hello_init.
>> the memory of print_k will be freed,and the second invoking will
>> not be executed.but the result of second invoking is executing .
>>
>> why?
>
> because you're still in module_init.... :)
>
> right after modul init stage is done, _init marked function is thrown away...


Even if we call  print_k() function inside hello_exit, it still works.
At that point __init hello_init execution is over. How its still
working?


Regards,
Vijay

>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[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