Added the module_dependency structure.

A module can now define modules it depends on, and they will be automatically
loaded before B_MODULE_INIT is called.
This information will also be evaluated by the boot loader, so that it can
load all needed modules without further hacks.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7316 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-04-26 17:11:56 +00:00
parent b4f28c2631
commit 29e1a3b55b

View File

@ -10,10 +10,9 @@
#include <OS.h>
/* 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