[libc-commits] [libc] [llvm] [libc] Moves __cxa_thread_atexit_impl into proper entrypoint (PR #229347)
Pavel Labath via libc-commits
libc-commits at lists.llvm.org
Tue Oct 6 05:51:44 PDT 2026
================
@@ -139,17 +139,15 @@ class ThreadAtExitCallbackMgr {
static LIBC_THREAD_LOCAL ThreadAtExitCallbackMgr atexit_callback_mgr;
+int add_thread_atexit_callback(AtExitCallback *callback, void *obj) {
+ return atexit_callback_mgr.add_callback(callback, obj);
+}
// The function __cxa_thread_atexit is provided by C++ runtimes like libcxxabi.
// It is used by thread local object runtime to register destructor calls. To
// actually register destructor call with the threading library, it calls
// __cxa_thread_atexit_impl, which is to be provided by the threading library.
// The semantics are very similar to the __cxa_atexit function except for the
// fact that the registered callback is thread specific.
----------------
labath wrote:
This comment is out of place now. Delete it or just leave a short note about how the above function relates to __cxa_thread_atexit. If you do that, make sure the comment goes before the function is is describing.
https://github.com/llvm/llvm-project/pull/229347
More information about the libc-commits
mailing list