Global initialization of C++ static objects

I *think* I have this working right...?
This commit is contained in:
Eryn Wells 2016-02-28 03:46:30 -05:00
parent 760884de78
commit d997765710
4 changed files with 48 additions and 12 deletions

View file

@ -14,8 +14,15 @@
extern "C"
void
kearly()
{ }
/** The beginning of the world... */
extern "C"
void
kmain()
{
kernel::Console console;
auto console = kernel::Console::systemConsole();
console.clear(kernel::Console::Color::Blue);
console.writeString("Hello world!\n");
@ -31,15 +38,8 @@ kearly()
i = (i + 1) % 26;
j = (j + 1) % 500;
for (uint32_t k = 0; k < (2u << 27) - 1; k++) {
for (uint32_t k = 0; k < (2u << 20) - 1; k++) {
foo /= 2;
}
}
}
/** The beginning of the world... */
extern "C"
void
kmain()
{ }