[libc-commits] [libc] [libc][stdlib] initial support for __cxa_finalize (PR #85865)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Tue Mar 19 14:05:21 PDT 2024
================
@@ -71,20 +67,31 @@ void call_exit_callbacks() {
ExitCallbackList::destroy(&exit_callbacks);
}
-} // namespace internal
-
-static int add_atexit_unit(const AtExitUnit &unit) {
+int add_atexit_unit(const AtExitUnit &unit) {
MutexLock lock(&handler_list_mtx);
- if (!exit_callbacks.push_back(unit))
----------------
petrhosek wrote:
I slightly prefer the original version where we only execute the `if` body in the case of an error and continue otherwise.
https://github.com/llvm/llvm-project/pull/85865
More information about the libc-commits
mailing list