summaryrefslogtreecommitdiff
path: root/source/Target/ThreadList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Target/ThreadList.cpp')
-rw-r--r--source/Target/ThreadList.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/Target/ThreadList.cpp b/source/Target/ThreadList.cpp
index 20c285963882e..afdfda3b0ae1a 100644
--- a/source/Target/ThreadList.cpp
+++ b/source/Target/ThreadList.cpp
@@ -1,9 +1,8 @@
//===-- ThreadList.cpp ------------------------------------------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -38,8 +37,10 @@ const ThreadList &ThreadList::operator=(const ThreadList &rhs) {
if (this != &rhs) {
// Lock both mutexes to make sure neither side changes anyone on us while
// the assignment occurs
- std::lock_guard<std::recursive_mutex> guard(GetMutex());
- std::lock_guard<std::recursive_mutex> rhs_guard(rhs.GetMutex());
+ std::lock(GetMutex(), rhs.GetMutex());
+ std::lock_guard<std::recursive_mutex> guard(GetMutex(), std::adopt_lock);
+ std::lock_guard<std::recursive_mutex> rhs_guard(rhs.GetMutex(),
+ std::adopt_lock);
m_process = rhs.m_process;
m_stop_id = rhs.m_stop_id;