summaryrefslogtreecommitdiffstats
path: root/libcxx/include/mutex
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2019-08-14 16:21:27 +0000
committerMarshall Clow <mclow.lists@gmail.com>2019-08-14 16:21:27 +0000
commit2b1d42541f20ce919c7841328934f64366e39d7c (patch)
tree34344f7fe94faf4de6f5cb6574be9328b5ee3a65 /libcxx/include/mutex
parent2be59170d433be05204992838a1aadbc79d5e0d1 (diff)
downloadbcm5719-llvm-2b1d42541f20ce919c7841328934f64366e39d7c.tar.gz
bcm5719-llvm-2b1d42541f20ce919c7841328934f64366e39d7c.zip
Rework recursive_timed_mutex so that it uses __thread_id instead of using the lower-level __libcpp_thread_id. This is prep for fixing PR42918. Reviewed as https://reviews.llvm.org/D65895
llvm-svn: 368867
Diffstat (limited to 'libcxx/include/mutex')
-rw-r--r--libcxx/include/mutex6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/mutex b/libcxx/include/mutex
index 20c3ffc38b6..dca62202db1 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -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;
OpenPOWER on IntegriCloud