> linux/init.h: > > #ifndef MODULE > ... > #define module_init(x) __initcall(x); > #define __initcall(fn) device_initcall(fn) > #define device_initcall(fn) > __define_initcall("6",fn) > #define __define_initcall(level,fn) \ > static initcall_t __initcall_##fn __attribute_used__ > \ > __attribute__((__section__(".initcall" level > ".init"))) = fn > ... > #endif > > initcalls are processed in do_initcalls function in > init/main.c > > static void __init do_basic_setup(void) > { > .... > do_initcalls(); > } > > > > > thanks ! > > Amol thanks Rajat and Amol. One other question, 1) how does the kernel know which module to load first in order to satisfy dependencies issues ? 2) is there a way i could print the module init fn name from do_initcalls. to see in what order compiled in modules are called. tia. -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html