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
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");
30 namespace __cxxabiv1
{
31 /* Function shows error message when a call to pure virtual function
33 extern "C" void __cxa_pure_virtual(void) {
34 //manes::error er("runtime: call to pure virtual function");