Skip to content

Commit

Permalink
comment: update
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed Jun 3, 2024
1 parent 7c47a7c commit 22b152c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/kernel/libcxx/libcxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ extern "C" function_t __fini_array_start;
extern "C" function_t __fini_array_end;

void CppInit(void) {
// 调用构造函数
std::for_each(&__init_array_start, &__init_array_end,
[](function_t func) { (func)(); });
}

void CppDeInit(void) {
// 调用析构函数
std::for_each(&__fini_array_start, &__fini_array_end,
[](function_t func) { (func)(); });
}
Expand Down

0 comments on commit 22b152c

Please sign in to comment.