configuration option for kernel's multiboot-compliance
[quarnos.git] / modules / modules_start.cpp
blob43012b41d66548748db91b7c7d6389dd8eff81e2
1 #include "simple_mmanager.h"
2 #include "libs/delegate.h"
3 #include "manes/runtime.h"
4 #include "resources/rs232.h"
5 #include "services/service_manager.h"
6 extern "C" void start_module(modules::simple_mmanager *sman) {
7 modules::simple_mmanager::set_sman(sman);
8 GET_SERVICES()->call<delegate<void, const char*> >("early_logger", "print")("Module loaded. Registering rs232 driver...");
9 resources::rs232::register_resource();
10 GET_SERVICES()->call<delegate<void, const char*> >("early_logger", "print")("done\n");
13 void *operator new(unsigned int size) {
14 return modules::simple_mmanager::get_instance()->get_memory(size);
17 void *operator new[](unsigned int size) {
18 return operator new(size);
21 /* Code that should be executed when program exit, which won't ever
22 * happen to Manes
24 void *__dso_handle __attribute__((weak));
25 extern "C" void __cxa_atexit(void (*)(void *), void *, void *) {
26 /* manes::error er("runtime: attempt to terminate kernel process");
27 er.critical(); */
30 namespace __cxxabiv1 {
31 /* Function shows error message when a call to pure virtual function
32 * has happened */
33 extern "C" void __cxa_pure_virtual(void) {
34 //manes::error er("runtime: call to pure virtual function");
35 //er.critical();
36 while(1);