diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-24 22:19:39 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-08-24 22:19:39 +0200 |
| commit | b112e21f9017b90e3fc48c85383eb368033a97d0 (patch) | |
| tree | b61b3860c36e6c2b9166d246ea89d5627e3ba2f9 /dev/LibC++ | |
| parent | cfde696e68ce91ce776807ff44276136cb84e5ba (diff) | |
feat: LibC++: improve `exit` function.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibC++')
| -rw-r--r-- | dev/LibC++/base_process.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dev/LibC++/base_process.h b/dev/LibC++/base_process.h index a30ccca..034240f 100644 --- a/dev/LibC++/base_process.h +++ b/dev/LibC++/base_process.h @@ -24,16 +24,16 @@ inline int signal(int code) { return -1; } -extern "C" void (*__atexit__cdecl_ptr)(void); +extern "C" void (*__atexit_cdecl_ptr)(void); extern "C" void (**__atexit_lst_ptr)(void); extern "C" size_t __atexit_lst_cnt; -inline int exit(int code) { +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(); + if (__atexit_cdecl_ptr) __atexit_cdecl_ptr(); exit_(code); return -1; |
