[libcxx-commits] [PATCH] D117375: [libcxx][SystemZ][z/OS] added internal_threading_support.h

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 14 18:15:19 PST 2022


DanielMcIntosh-IBM added inline comments.


================
Comment at: libcxx/src/include/internal_threading_support.h:264-275
+  // ugly and devious way of getting cxa_exception_storage to work, but necessary if we want to
+  // keep all the runtime-dependent threading changes contained within internal_threading_support.h
+  if (!__libcpp_is_threading_api_enabled()) {
+    static struct {
+      void* caughtExceptions;
+      unsigned int uncaughtExceptions;
+    } eh_globals;
----------------
To me, this is horrendous, and a very strong reason to prefer what I proposed in D113054. Even if we go with the approach outlined in this PR for everything else except exception storage, I think that at the very least the runtime-dependent threading changes should be allowed to creep out of `internal_threading_support.h` and into `cxa_exception_storage.cpp`.

We may also not have any choice in the matter when adding support for a platform like AIX where `__libcpp_is_threading_api_enabled()` can change during program execution.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117375/new/

https://reviews.llvm.org/D117375



More information about the libcxx-commits mailing list