X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Fmodules.h;h=db3f91ad8a3a437326403b993507b0fd4813d3a0;hb=3e11c7767641614fbb3fad38fffefa0da9e66919;hp=8862112cbd9f7a7264c08275d7e726113cf229b3;hpb=775bf8013abe9fe4ef3d4883ea2e43bba2a84da1;p=tpg%2Facess2.git diff --git a/Kernel/include/modules.h b/Kernel/include/modules.h index 8862112c..db3f91ad 100644 --- a/Kernel/include/modules.h +++ b/Kernel/include/modules.h @@ -36,7 +36,7 @@ #if ARCHDIR == x86 # define MODULE_ARCH_ID 1 // IA64 - Architecture 2 -#elif ARCHDIR == x64 +#elif ARCHDIR == x86_64 # define MODULE_ARCH_ID 2 #else # error "Unknown architecture when determining MODULE_ARCH_ID ('" #ARCHDIR "')" @@ -73,7 +73,7 @@ typedef struct sModule struct sModule *Next; //!< Next module in list (not to be touched by the driver) char *Name; //!< Module Name/Identifier int (*Init)(char **Arguments); //!< Module initialiser / entrypoint - void (*Deinit)(); //!< Cleanup Function + void (*Deinit)(void); //!< Cleanup Function char **Dependencies; //!< NULL terminated list of dependencies } PACKED tModule; @@ -87,6 +87,7 @@ enum eModuleErrors MODULE_ERR_NOTNEEDED, //!< Module not needed MODULE_ERR_MALLOC, //!< Error with malloc/realloc/calloc + MODULE_ERR_BADMODULE, //!< Bad module (only used by loader) MODULE_ERR_MAX //!< Maximum defined error code }; @@ -112,4 +113,11 @@ typedef struct sModuleLoader */ extern int Module_RegisterLoader(tModuleLoader *Loader); +/** + * \brief Initialise a named builtin module + * \param Name Module name to initialise + * \return -1 on not existing, 0 if the module initialised (or if it was already initialised) + */ +extern int Modules_InitialiseBuiltin(const char *Name); + #endif