mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 20:29:39 +08:00
Merging r369537:
------------------------------------------------------------------------ r369537 | davidspickett | 2019-08-21 17:38:24 +0200 (Wed, 21 Aug 2019) | 7 lines [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 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@369639 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -79,7 +79,7 @@ typedef pthread_t __libcpp_thread_t;
|
|||||||
typedef pthread_key_t __libcpp_tls_key;
|
typedef pthread_key_t __libcpp_tls_key;
|
||||||
|
|
||||||
#define _LIBCPP_TLS_DESTRUCTOR_CC
|
#define _LIBCPP_TLS_DESTRUCTOR_CC
|
||||||
#else
|
#elif !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
|
||||||
// Mutex
|
// Mutex
|
||||||
typedef void* __libcpp_mutex_t;
|
typedef void* __libcpp_mutex_t;
|
||||||
#define _LIBCPP_MUTEX_INITIALIZER 0
|
#define _LIBCPP_MUTEX_INITIALIZER 0
|
||||||
@@ -112,8 +112,9 @@ typedef void* __libcpp_thread_t;
|
|||||||
typedef long __libcpp_tls_key;
|
typedef long __libcpp_tls_key;
|
||||||
|
|
||||||
#define _LIBCPP_TLS_DESTRUCTOR_CC __stdcall
|
#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
|
// Mutex
|
||||||
_LIBCPP_THREAD_ABI_VISIBILITY
|
_LIBCPP_THREAD_ABI_VISIBILITY
|
||||||
int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m);
|
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
|
_LIBCPP_THREAD_ABI_VISIBILITY
|
||||||
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
|
int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
|
||||||
|
|
||||||
|
#endif // !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
|
||||||
|
|
||||||
#if (!defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
|
#if (!defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
|
||||||
defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL)) && \
|
defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL)) && \
|
||||||
defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
|
defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
|
||||||
|
|||||||
Reference in New Issue
Block a user