|
SimpleKernel 1.17.0
|
#include <cpu_io.h>#include <stdint.h>#include <algorithm>#include <atomic>#include "kernel_log.hpp"
Go to the source code of this file.
Classes | |
| struct | atexit_func_entry_t |
| 析构函数结构 More... | |
| struct | GuardType |
Typedefs | |
| using | function_t = void(*)() |
| 全局构造函数函数指针 | |
Functions | |
| auto | __cxa_atexit (void(*destructor_func)(void *), void *obj_ptr, void *) -> int |
| auto | __cxa_finalize (void *destructor_func) -> void |
| auto | __cxa_pure_virtual () -> void |
| auto | abort () -> void |
| void | __assert_fail (const char *assertion, const char *file, unsigned int line, const char *function) |
| libc assert() 失败时调用的底层接口 | |
| auto | CppInit () -> void |
| 构造 c++ 全局对象 | |
| auto | CppDeInit () -> void |
| 析构 c++ 全局对象 | |
保证静态局部变量线程安全 | |
| |
| auto | __cxa_guard_acquire (GuardType *guard) -> int |
| auto | __cxa_guard_release (GuardType *guard) -> void |
| auto | __cxa_guard_abort (GuardType *guard) -> void |
Variables | |
| function_t | __init_array_start |
| 全局构造函数函数指针起点地址 | |
| function_t | __init_array_end |
| 全局构造函数函数指针终点地址 | |
| function_t | __fini_array_start |
| 全局析构函数函数指针起点地址 | |
| function_t | __fini_array_end |
| 全局析构函数函数指针终点地址 | |
| void * | __dso_handle = nullptr |
| 动态共享对象标识,内核使用静态链接,此变量在内核中没有使用 | |
| static constexpr size_t | kMaxAtExitFuncsCount = 128 |
| 最大析构函数数量 | |
| static atexit_func_entry_t | atexit_funcs [kMaxAtExitFuncsCount] |
| 析构函数数组 | |
| static size_t | atexit_func_count = 0 |
| 析构函数个数 | |
| using function_t = void (*)() |
全局构造函数函数指针
Definition at line 14 of file kstd_libcxx.cpp.
| void __assert_fail | ( | const char * | assertion, |
| const char * | file, | ||
| unsigned int | line, | ||
| const char * | function | ||
| ) |
libc assert() 失败时调用的底层接口
| assertion | 断言表达式字符串 |
| file | 源文件名 |
| line | 行号 |
| function | 函数名 |
Definition at line 199 of file kstd_libcxx.cpp.

| auto __cxa_atexit | ( | void(*)(void *) | destructor_func, |
| void * | obj_ptr, | ||
| void * | |||
| ) | -> int |
注册在程序正常终止时调用的析构函数
| destructor_func | 指向要调用的析构函数的指针 |
| obj_ptr | 传递给析构函数的参数 |
Definition at line 51 of file kstd_libcxx.cpp.
| auto __cxa_finalize | ( | void * | destructor_func | ) | -> void |
调用析构函数
| destructor_func | 要调用的析构函数指针,为 nullptr 时调用所有注册的析构函数。 |
Definition at line 68 of file kstd_libcxx.cpp.
| auto __cxa_guard_abort | ( | GuardType * | guard | ) | -> void |
如果在初始化过程中出现异常或其他错误,调用此函数以释放锁而不标记变量为已初始化
| guard | 锁 |
Definition at line 167 of file kstd_libcxx.cpp.
| auto __cxa_guard_acquire | ( | GuardType * | guard | ) | -> int |
检测静态局部变量是否已经初始化
| guard | 锁,一个 64 位变量 |
Definition at line 127 of file kstd_libcxx.cpp.

| auto __cxa_guard_release | ( | GuardType * | guard | ) | -> void |
用于检测静态局部变量是否已经初始化,并设置锁
| guard | 锁,一个 64 位变量 |
Definition at line 158 of file kstd_libcxx.cpp.
| auto __cxa_pure_virtual | ( | ) | -> void |
| auto abort | ( | ) | -> void |
| auto CppDeInit | ( | ) | -> void |
析构 c++ 全局对象
c++ 全局对象析构
Definition at line 230 of file kstd_libcxx.cpp.
| auto CppInit | ( | ) | -> void |
构造 c++ 全局对象
c++ 全局对象构造
Definition at line 221 of file kstd_libcxx.cpp.

| void* __dso_handle = nullptr |
动态共享对象标识,内核使用静态链接,此变量在内核中没有使用
Definition at line 25 of file kstd_libcxx.cpp.
| function_t __fini_array_end |
全局析构函数函数指针终点地址
Definition at line 23 of file kstd_libcxx.cpp.
| function_t __fini_array_start |
全局析构函数函数指针起点地址
Definition at line 21 of file kstd_libcxx.cpp.
| function_t __init_array_end |
全局构造函数函数指针终点地址
Definition at line 19 of file kstd_libcxx.cpp.
| function_t __init_array_start |
全局构造函数函数指针起点地址
Definition at line 17 of file kstd_libcxx.cpp.
|
static |
析构函数个数
Definition at line 43 of file kstd_libcxx.cpp.
|
static |
析构函数数组
Definition at line 41 of file kstd_libcxx.cpp.
|
staticconstexpr |
最大析构函数数量
Definition at line 28 of file kstd_libcxx.cpp.