[libcxx-commits] [PATCH] D110349: [libcxx][SystemZ][z/OS] Added are_threads_enabled and has_spawned_other_threads to __threading_support

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


DanielMcIntosh-IBM created this revision.
DanielMcIntosh-IBM added reviewers: ldionne, EricWF.
Herald added a subscriber: mgorny.
DanielMcIntosh-IBM requested review of this revision.
Herald added projects: libc++, LLVM.
Herald added subscribers: llvm-commits, libcxx-commits.
Herald added a reviewer: libc++.

On z/OS, the availability of several POSIX functions depends on the
environment at program start. As a result, we don't know at compile
time if mutexes and multithreading is supported.

The z/OS Language Environment provides a flag CEEEDB_POSIX to check
whether POSIX functions (and thus threading support) is enabled. It
also provides a flag CEEEDBMULTITHREAD which is set to true when more
than 1 thread is running, which we can use as an alternative in some
cases to get a little extra performance out of single-threaded
applications.

Since there are many places we are going to need to check one of these
flags, this PR adds functions for doing that to __threading_support.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110349

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__support/ibm/ceeedb.h
  libcxx/include/__threading_support
  llvm/utils/gn/secondary/libcxx/include/BUILD.gn

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


More information about the libcxx-commits mailing list