diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-29 22:26:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-29 22:26:33 -0500 |
| commit | db929ce81ca026cabb6d61d3c7b80190262d3c83 (patch) | |
| tree | df8f090049f9a3893da80ab7aae5bd001297cd5b /src/LibC++ | |
| parent | 0c8f94db58637420fa3b9513823a3cdb3e92bf38 (diff) | |
| parent | f900849f98bad9988805ec89c587395752490486 (diff) | |
Merge pull request #40 from nekernel-org/developv0.0.7
chore: API and system design update.
Diffstat (limited to 'src/LibC++')
| -rw-r--r-- | src/LibC++/__abi+unreachable.cc | 3 | ||||
| -rw-r--r-- | src/LibC++/__abi.h | 2 | ||||
| -rw-r--r-- | src/LibC++/base_process.h | 36 | ||||
| -rw-r--r-- | src/LibC++/defines.h | 8 |
4 files changed, 24 insertions, 25 deletions
diff --git a/src/LibC++/__abi+unreachable.cc b/src/LibC++/__abi+unreachable.cc index 1fc9830..5628e7d 100644 --- a/src/LibC++/__abi+unreachable.cc +++ b/src/LibC++/__abi+unreachable.cc @@ -12,6 +12,5 @@ static const int32_t __unreachable_code = 34; extern "C" void __compilerkit_unreachable(void) { std::base_process::signal(__unreachable_code); - while (1) - ; + while (1); }
\ No newline at end of file diff --git a/src/LibC++/__abi.h b/src/LibC++/__abi.h index 70afae5..206b5ef 100644 --- a/src/LibC++/__abi.h +++ b/src/LibC++/__abi.h @@ -10,6 +10,6 @@ __init_decl() -extern void __compilerkit_unreachable(void); + extern void __compilerkit_unreachable(void); __fini_decl()
\ No newline at end of file diff --git a/src/LibC++/base_process.h b/src/LibC++/base_process.h index f9b0596..cb25aa1 100644 --- a/src/LibC++/base_process.h +++ b/src/LibC++/base_process.h @@ -10,10 +10,10 @@ __init_decl() -/// @brief CRT exit, with exit code (!!! exits all threads. !!!) -/// @param code the exit code. -/// @return the return > 0 for non successful. -extern int exit_(int code); + /// @brief CRT exit, with exit code (!!! exits all threads. !!!) + /// @param code the exit code. + /// @return the return > 0 for non successful. + extern int exit_(int code); /// @brief CRT signal handler. /// @param code the signal code. @@ -25,21 +25,21 @@ extern size_t __atexit_lst_cnt; __fini_decl() -/// @brief Standard C++ namespace -namespace std::base_process { -inline int signal(int code) { - signal_(code); - return -1; -} - -inline int32_t exit(const int32_t& code) { - for (auto idx = 0UL; idx < __atexit_lst_cnt; ++idx) { - __atexit_lst_ptr[idx](); + /// @brief Standard C++ namespace + namespace std::base_process { + inline int signal(int code) { + signal_(code); + return -1; } - if (__atexit_cdecl_ptr) __atexit_cdecl_ptr(); + inline int32_t exit(const int32_t& code) { + for (auto idx = 0UL; idx < __atexit_lst_cnt; ++idx) { + __atexit_lst_ptr[idx](); + } + + if (__atexit_cdecl_ptr) __atexit_cdecl_ptr(); - exit_(code); - return -1; -} + exit_(code); + return -1; + } } // namespace std::base_process diff --git a/src/LibC++/defines.h b/src/LibC++/defines.h index b8ef10c..9293bc2 100644 --- a/src/LibC++/defines.h +++ b/src/LibC++/defines.h @@ -17,10 +17,10 @@ typedef void* ptr_type; typedef __SIZE_TYPE__ size_type; typedef __INT64_TYPE__ ptrdiff_t; -typedef size_t uintptr_t; -typedef void* voidptr_t; -typedef void* any_t; -typedef char* caddr_t; +typedef size_t uintptr_t; +typedef void* voidptr_t; +typedef void* any_t; +typedef char* caddr_t; #ifndef NULL #define NULL ((voidptr_t) 0) |
