* Copyright 2010 Evan Lojewski. All rights reserved.␊ |
*␊ |
*/␊ |
#ifdef CONFIG_MODULES␊ |
#ifndef CONFIG_MODULE_DEBUG␊ |
#define CONFIG_MODULE_DEBUG 0␊ |
#endif␊ |
␊ |
#include "boot.h"␊ |
#include "bootstruct.h"␊ |
#include "modules.h"␊ |
#include "boot_modules.h"␊ |
#include <vers.h>␊ |
␊ |
#ifdef CONFIG_MODULES␊ |
#ifndef CONFIG_MODULE_DEBUG␊ |
#define CONFIG_MODULE_DEBUG 0␊ |
#endif␊ |
␊ |
␊ |
#if CONFIG_MODULE_DEBUG␊ |
#define DBG(x...)␉printf(x);␊ |
#define DBGPAUSE()␉getchar()␊ |
|
␉return retVal;␊ |
}␊ |
␊ |
void start_built_in_module(const char* name, ␊ |
const char* author, ␊ |
const char* description,␊ |
UInt32 version,␊ |
UInt32 compat,␊ |
void(*start_function)(void))␊ |
{␊ |
start_function();␊ |
// Notify the module system that this module really exists, specificaly, let other module link with it␊ |
module_loaded(name, author, description, version, compat);␊ |
}␊ |
␊ |
␊ |
/*␊ |
* Load all modules in the /Extra/modules/ directory␊ |
* Module depencdies will be loaded first␊ |
|
{␊ |
return 0;␊ |
}␊ |
␊ |
void register_hook_callback(const char* name, void(*callback)(void*, void*, void*, void*))␊ |
{␊ |
␉printf("WARNING: register_hook_callback is not supported when compiled in.\n");␊ |
␉pause();␊ |
}␊ |
␊ |
int replace_function(const char* symbol, void* newAddress)␊ |
{␊ |
␉printf("WARNING: replace_functions is not supported when compiled in.\n");␊ |
␉pause();␊ |
␉return 0;␊ |
}␊ |
␊ |
void start_built_in_module(const char* name, ␊ |
const char* author, ␊ |
const char* description,␊ |
UInt32 version,␊ |
UInt32 compat,␊ |
void(*start_function)(void))␊ |
{␊ |
start_function();␊ |
}␊ |
␊ |
#endif |