[libcxx-commits] [PATCH] D66518: [libcxx] Only declare contents of threading API when _LIBCPP_HAS_THREAD_API_EXTERNAL is not defined.

Hans Wennborg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 22 03:32:40 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL369639: Merging r369537: (authored by hans, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D66518?vs=216413&id=216577#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66518/new/

https://reviews.llvm.org/D66518

Files:
  libcxx/branches/release_90
  libcxx/branches/release_90/include/__threading_support


Index: libcxx/branches/release_90/include/__threading_support
===================================================================
--- libcxx/branches/release_90/include/__threading_support
+++ libcxx/branches/release_90/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,8 +112,9 @@
 typedef long __libcpp_tls_key;
 
 #define _LIBCPP_TLS_DESTRUCTOR_CC __stdcall
-#endif // defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#endif // !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
 
+#if !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
 // Mutex
 _LIBCPP_THREAD_ABI_VISIBILITY
 int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m);
@@ -208,6 +209,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.216577.patch
Type: text/x-patch
Size: 1216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190822/c9c0a2ea/attachment.bin>


More information about the libcxx-commits mailing list