diff options
| author | David Spickett <david.spickett@arm.com> | 2019-08-21 15:38:24 +0000 |
|---|---|---|
| committer | David Spickett <david.spickett@arm.com> | 2019-08-21 15:38:24 +0000 |
| commit | e2b200b7bfa1f4ae2606f375fd7eb7f44cc208fc (patch) | |
| tree | f4ee1fa5e9097fea86f19539794b9d462e18cdb0 /libcxx | |
| parent | f56e8991f44f867eb8ea29b0d40c991d1326615b (diff) | |
| download | bcm5719-llvm-e2b200b7bfa1f4ae2606f375fd7eb7f44cc208fc.tar.gz bcm5719-llvm-e2b200b7bfa1f4ae2606f375fd7eb7f44cc208fc.zip | |
[libcxx] Only declare contents of threading API when
_LIBCPP_HAS_THREAD_API_EXTERNAL is not defined.
When it is defined they will be declared by the
__external_threading header instead.
Differential revision: https://reviews.llvm.org/D66518
llvm-svn: 369537
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/include/__threading_support | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support index 46ac7d8b362..0d1f1e681f5 100644 --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -79,7 +79,7 @@ typedef pthread_t __libcpp_thread_t; 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 void* __libcpp_thread_t; 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 @@ void *__libcpp_tls_get(__libcpp_tls_key __key); _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) |

