[libcxx-commits] [PATCH] D66518: [libcxx] Only declare contents of threading API when _LIBCPP_HAS_THREAD_API_EXTERNAL is not defined.
David Spickett via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 21 02:16:54 PDT 2019
DavidSpickett created this revision.
DavidSpickett added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added subscribers: jfb, christof.
Herald added a project: libc++.
When it is defined they will be declared by the __external_threading header instead.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D66518
Files:
libcxx/include/__threading_support
Index: libcxx/include/__threading_support
===================================================================
--- libcxx/include/__threading_support
+++ libcxx/include/__threading_support
@@ -79,7 +79,7 @@
typedef pthread_key_t __libcpp_tls_key;
#define _LIBCPP_TLS_DESTRUCTOR_CC
-#else
+#elif !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
// Mutex
typedef void* __libcpp_mutex_t;
#define _LIBCPP_MUTEX_INITIALIZER 0
@@ -112,7 +112,6 @@
typedef long __libcpp_tls_key;
#define _LIBCPP_TLS_DESTRUCTOR_CC __stdcall
-#endif // defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
// Mutex
_LIBCPP_THREAD_ABI_VISIBILITY
@@ -208,6 +207,8 @@
_LIBCPP_THREAD_ABI_VISIBILITY
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
+#endif // !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+
#if (!defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL)) && \
defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66518.216348.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190821/655b56f2/attachment.bin>
More information about the libcxx-commits
mailing list