[libcxx-commits] [PATCH] D66301: [libcxx] __thread_id should be available when an external threading API is used.

David Spickett via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 15 08:56:43 PDT 2019

DavidSpickett created this revision.
DavidSpickett added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added a subscriber: christof.

Commit r368867 "Fix a layering violation in mutex"
moved "__thread_id" from <thread> to <__threading_support>.

Along the way the conditions for its presence changed.
Before it only required that threading was supported.
Now it needs that and you not to be using an external

This change restores the old behaviour by putting it
in a separate block with the correct condition.



Index: libcxx/include/__threading_support
--- libcxx/include/__threading_support
+++ libcxx/include/__threading_support
@@ -395,6 +395,19 @@
+#if !defined(_LIBCPP_HAS_NO_THREADS)
+#include <__undef_macros>
 class _LIBCPP_TYPE_VIS thread;
 class _LIBCPP_TYPE_VIS __thread_id;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66301.215411.patch
Type: text/x-patch
Size: 622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190815/c5fdbaa4/attachment.bin>

More information about the libcxx-commits mailing list