diff --git a/headers/os/drivers/module.h b/headers/os/drivers/module.h index a725708a47..3c8a1514b3 100644 --- a/headers/os/drivers/module.h +++ b/headers/os/drivers/module.h @@ -10,10 +10,9 @@ #include -/* module info structure - * Every module exports it - modules are identified - * by the name given in this structure. - * It exports the functions that the module support. +/* Every module exports a list of module_info structures. + * It defines the interface of the module and the name + * that is used to access the interface. */ typedef struct module_info { @@ -30,6 +29,17 @@ typedef struct module_info { #define B_KEEP_LOADED 0x00000001 +/* Use the module_dependency structure to let the + * kernel automatically load modules yet depend on + * before B_MODULE_INIT is called. + */ + +typedef struct module_dependency { + const char *name; + module_info **info; +} module_dependency; + + #ifdef __cplusplus extern "C" { #endif