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:
@@ -10,10 +10,9 @@
|
|||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|
||||||
|
|
||||||
/* module info structure
|
/* Every module exports a list of module_info structures.
|
||||||
* Every module exports it - modules are identified
|
* It defines the interface of the module and the name
|
||||||
* by the name given in this structure.
|
* that is used to access the interface.
|
||||||
* It exports the functions that the module support.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct module_info {
|
typedef struct module_info {
|
||||||
@@ -30,6 +29,17 @@ typedef struct module_info {
|
|||||||
#define B_KEEP_LOADED 0x00000001
|
#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
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user