thread_support: split out {,non-}recursive mutex
Split out the recursive and non-recursive mutex. This split is needed
for platforms which may use differing types for the two mutex (e.g.
Win32 threads).
llvm-svn: 291145
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 58a0dcee8009d6504ce05874e644eb1df1276a11
diff --git a/include/mutex b/include/mutex
index 155b2c3..8526533 100644
--- a/include/mutex
+++ b/include/mutex
@@ -206,7 +206,7 @@
class _LIBCPP_TYPE_VIS recursive_mutex
{
- __libcpp_mutex_t __m_;
+ __libcpp_recursive_mutex_t __m_;
public:
recursive_mutex();
@@ -221,7 +221,8 @@
bool try_lock() _NOEXCEPT;
void unlock() _NOEXCEPT;
- typedef __libcpp_mutex_t* native_handle_type;
+ typedef __libcpp_recursive_mutex_t* native_handle_type;
+
_LIBCPP_INLINE_VISIBILITY
native_handle_type native_handle() {return &__m_;}
};