[libcxx-commits] [PATCH] D135464: [SystemZ][z/OS] Account for no __cxa_thread_atexit_impl on z/OS
Muiez Ahmed via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 24 13:02:03 PDT 2022
muiez updated this revision to Diff 470269.
muiez added a comment.
Abort with message instead of silently returning 0.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135464/new/
https://reviews.llvm.org/D135464
Files:
libcxxabi/src/cxa_thread_atexit.cpp
Index: libcxxabi/src/cxa_thread_atexit.cpp
===================================================================
--- libcxxabi/src/cxa_thread_atexit.cpp
+++ libcxxabi/src/cxa_thread_atexit.cpp
@@ -27,7 +27,15 @@
// at runtime, even if libc++ is built against an older libc
_LIBCXXABI_WEAK
#endif
+#ifdef __MVS__
+ // FIXME: No __cxa_thread_atexit_impl on z/OS.
+ int __cxa_thread_atexit_impl(Dtor, void*, void*) {
+ abort_message("__cxa_thread_atexit() is not implemented on z/OS");
+ return -1;
+ }
+#else
int __cxa_thread_atexit_impl(Dtor, void*, void*);
+#endif
#ifndef HAVE___CXA_THREAD_ATEXIT_IMPL
@@ -67,9 +75,15 @@
};
// The linked list of thread-local destructors to run
- __thread DtorList* dtors = nullptr;
+#ifndef __MVS__
+ __thread
+#endif
+ DtorList* dtors = nullptr;
// True if the destructors are currently scheduled to run on this thread
- __thread bool dtors_alive = false;
+#ifndef __MVS__
+ __thread
+#endif
+ bool dtors_alive = false;
// Used to trigger destructors on thread exit; value is ignored
std::__libcpp_tls_key dtors_key;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135464.470269.patch
Type: text/x-patch
Size: 1100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221024/4797cd8f/attachment.bin>
More information about the libcxx-commits
mailing list