[libcxx-commits] [PATCH] D110351: [libcxxabi][SystemZ][z/OS] Added HybridGuard to cxa_guard

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 23 10:45:33 PDT 2021


DanielMcIntosh-IBM created this revision.
DanielMcIntosh-IBM added reviewers: ldionne, EricWF.
DanielMcIntosh-IBM requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

As described in D110349 <https://reviews.llvm.org/D110349>, on z/OS applications don't know at compile
time if threading support is enabled, so cxa_guard has to check that
at runtime, and adjust it's behaviour accordingly.

However, rather than checking if threading support is enabled, we can
instead check if there are potentially other threads running, and get
a little extra performance out of single-threaded applications.

This PR is the motivating factor for overhauling cxa_guard in D108343 <https://reviews.llvm.org/D108343>

Depends on D110341 <https://reviews.llvm.org/D110341>, D110349 <https://reviews.llvm.org/D110349>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110351

Files:
  libcxxabi/src/cxa_guard_impl.h
  libcxxabi/test/guard_test_basic.pass.cpp
  libcxxabi/test/guard_threaded_test.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110351.374618.patch
Type: text/x-patch
Size: 7129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210923/3ea636f6/attachment.bin>


More information about the libcxx-commits mailing list