mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:28:12 +00:00
Kernel: Move global constructor invocation a bit earlier
This commit is contained in:
parent
a066dd1fac
commit
e4ab908fe0
1 changed files with 5 additions and 4 deletions
|
@ -119,6 +119,11 @@ extern "C" [[noreturn]] void init()
|
|||
gdt_init();
|
||||
idt_init();
|
||||
|
||||
// Invoke all static global constructors in the kernel.
|
||||
// Note that we want to do this as early as possible.
|
||||
for (ctor_func_t* ctor = &start_ctors; ctor < &end_ctors; ctor++)
|
||||
(*ctor)();
|
||||
|
||||
setup_interrupts();
|
||||
setup_acpi();
|
||||
|
||||
|
@ -134,10 +139,6 @@ extern "C" [[noreturn]] void init()
|
|||
|
||||
setup_time_management();
|
||||
|
||||
// call global constructors after gtd and itd init
|
||||
for (ctor_func_t* ctor = &start_ctors; ctor < &end_ctors; ctor++)
|
||||
(*ctor)();
|
||||
|
||||
new NullDevice;
|
||||
if (!get_serial_debug())
|
||||
new SerialDevice(SERIAL_COM1_ADDR, 64);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue