Unreliable Guide To Hacking The Linux Kernel | ||
---|---|---|
<<< Previous | Common Routines | Next >>> |
After boot, the kernel frees up a special section; functions marked with __init and data structures marked with __initdata are dropped after boot is complete (within modules this directive is currently ignored). __exit is used to declare a function which is only required on exit: the function will be dropped if this file is not compiled as a module. See the header file for use. Note that it makes no sense for a function marked with __init to be exported to modules with EXPORT_SYMBOL() - this will break.
Static data structures marked as __initdata must be initialised (as opposed to ordinary static data which is zeroed BSS) and cannot be const.
<<< Previous | Home | Next >>> |
smp_processor_id()/cpu_[number/logical]_map() include/asm/smp.h | Up | __initcall()/module_init() include/linux/init.h |