[PATCH] [libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.

David Majnemer david.majnemer at gmail.com
Wed Dec 17 11:52:52 PST 2014


================
Comment at: src/cxa_thread_atexit.cpp:18-20
@@ +17,5 @@
+                        void *dso_symbol) throw() {
+  extern int __cxa_thread_atexit_impl(void (*)(void *), void *, void *);
+  return __cxa_thread_atexit_impl(dtor, obj, dso_symbol);
+}
+
----------------
The only libc which provides `__cxa_thread_atexit_impl` is glibc.  Other libc implementations on linux do not and it doesn't seem available on the BSDs.

I think it makes sense to forward to `__cxa_thread_atexit_impl` if the symbol exists, otherwise we need to have a definition of `__cxa_thread_atexit` which can do the real heavy lifting.

http://reviews.llvm.org/D6708

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list