[PATCH] D19412: [libcxx] Refactor pthread usage - II

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 22 08:25:11 PDT 2016


rmaprath created this revision.
rmaprath added reviewers: EricWF, theraven, mclow.lists, jroelofs.
rmaprath added subscribers: espositofulvio, cfe-commits.

This is mostly D11781 with the final review comments addressed:
- Merged all the headers into a single `__os_support` header
- Moved all internal functions (those only used by the library sources) away from the headers. This required adding a few `#ifdef`s into the library sources to select between the thread API.

Note that this is only a refactoring, in that it isolates pthread usage of libcxx allowing anyone to easily plug-in a different thread implementation into libcxx sources.

The final goal of this work (at least for us) is a bit more involved: we want to allow libcxx users to plug-in their own thread implementation at compile time. I have a patch for this which builds on the current one, I will be uploading it soon for comments.



http://reviews.llvm.org/D19412

Files:
  include/__config
  include/__mutex_base
  include/__os_support
  include/mutex
  include/thread
  src/algorithm.cpp
  src/condition_variable.cpp
  src/memory.cpp
  src/mutex.cpp
  src/thread.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19412.54654.patch
Type: text/x-patch
Size: 24924 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160422/491fae92/attachment-0001.bin>


More information about the cfe-commits mailing list