KernOS
global.cpp
Go to the documentation of this file.
1
//
2
// Created on 5/24/20.
3
//
4
5
#include <
global.h
>
6
#include <
ktypes.h
>
7
11
extern
func_ptr
start_ctors
;
12
16
extern
func_ptr
end_ctors
;
17
18
namespace
INIT
19
{
29
void
ctors
()
30
{
31
32
for
(
func_ptr
*ctor = &
start_ctors
; ctor < &
end_ctors
; ++ctor) {
33
(*ctor)();
34
}
35
}
36
}
// namespace INIT
37
func_ptr
void(*)() func_ptr
Definition:
ktypes.h:16
global.h
INIT::ctors
void ctors()
calls constructors on all global objects
Definition:
global.cpp:29
INIT
contains all kernel initialization routines
Definition:
cpu.h:10
start_ctors
func_ptr start_ctors
starting address of pointers to global constructors
end_ctors
func_ptr end_ctors
ending address of pointers to global constructors
ktypes.h
OS
kernel
arch
x86
global.cpp
Generated by
1.8.13