aboutsummaryrefslogtreecommitdiffstats
path: root/include/mutex
diff options
context:
space:
mode:
Diffstat (limited to 'include/mutex')
-rw-r--r--include/mutex12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/mutex b/include/mutex
index 20c3ffc38b63..8fc3c61221b5 100644
--- a/include/mutex
+++ b/include/mutex
@@ -86,9 +86,9 @@ public:
void unlock();
};
-struct defer_lock_t {};
-struct try_to_lock_t {};
-struct adopt_lock_t {};
+struct defer_lock_t { explicit defer_lock_t() = default; };
+struct try_to_lock_t { explicit try_to_lock_t() = default; };
+struct adopt_lock_t { explicit adopt_lock_t() = default; };
inline constexpr defer_lock_t defer_lock{};
inline constexpr try_to_lock_t try_to_lock{};
@@ -280,7 +280,7 @@ class _LIBCPP_TYPE_VIS recursive_timed_mutex
mutex __m_;
condition_variable __cv_;
size_t __count_;
- __libcpp_thread_id __id_;
+ __thread_id __id_;
public:
recursive_timed_mutex();
~recursive_timed_mutex();
@@ -307,9 +307,9 @@ bool
recursive_timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t)
{
using namespace chrono;
- __libcpp_thread_id __id = __libcpp_thread_get_current_id();
+ __thread_id __id = this_thread::get_id();
unique_lock<mutex> lk(__m_);
- if (__libcpp_thread_id_equal(__id, __id_))
+ if (__id == __id_)
{
if (__count_ == numeric_limits<size_t>::max())
return false;