# define MODULE_ARCH_ID 2
#else
# error "Unknown architecture when determining MODULE_ARCH_ID ('" #ARCHDIR "')"
# define MODULE_ARCH_ID 2
#else
# error "Unknown architecture when determining MODULE_ARCH_ID ('" #ARCHDIR "')"
* Contains the identifiers of the required modules.
*/
#define MODULE_DEFINE(_flags,_ver,_ident,_entry,_deinit,_deps...) \
* Contains the identifiers of the required modules.
*/
#define MODULE_DEFINE(_flags,_ver,_ident,_entry,_deinit,_deps...) \
tModule __attribute__ ((section ("KMODULES"),unused))\
EXPAND_CONCAT(_DriverInfo_,_ident)=\
{MODULE_MAGIC,MODULE_ARCH_ID,_flags,_ver,NULL,EXPAND_STR(_ident),\
tModule __attribute__ ((section ("KMODULES"),unused))\
EXPAND_CONCAT(_DriverInfo_,_ident)=\
{MODULE_MAGIC,MODULE_ARCH_ID,_flags,_ver,NULL,EXPAND_STR(_ident),\
Uint8 Flags; //!< Module Flags
Uint16 Version; //!< Module Version in Major.Minor 8.8 form
struct sModule *Next; //!< Next module in list (not to be touched by the driver)
Uint8 Flags; //!< Module Flags
Uint16 Version; //!< Module Version in Major.Minor 8.8 form
struct sModule *Next; //!< Next module in list (not to be touched by the driver)
- void (*Deinit)(); //!< Cleanup Function
- char **Dependencies; //!< NULL terminated list of dependencies
+ void (*Deinit)(void); //!< Cleanup Function
+ const char **Dependencies; //!< NULL terminated list of dependencies
MODULE_ERR_NOTNEEDED, //!< Module not needed
MODULE_ERR_MALLOC, //!< Error with malloc/realloc/calloc
MODULE_ERR_NOTNEEDED, //!< Module not needed
MODULE_ERR_MALLOC, //!< Error with malloc/realloc/calloc
+/**
+ * \brief Initialises (if needed) a named 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 Module_EnsureLoaded(const char *Name);
+