Skip to content

Commit b9153c2

Browse files
committed
[lldb-dap] add scoped_lock template params
1 parent fd2f356 commit b9153c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "lldb/API/SBEvent.h"
2727
#include "lldb/API/SBLanguageRuntime.h"
2828
#include "lldb/API/SBListener.h"
29+
#include "lldb/API/SBMutex.h"
2930
#include "lldb/API/SBProcess.h"
3031
#include "lldb/API/SBStream.h"
3132
#include "lldb/Host/JSONTransport.h"
@@ -1455,7 +1456,8 @@ void DAP::EventThread() {
14551456
// NOTE: Both mutexes must be acquired to prevent deadlock when
14561457
// handling `modules_request`, which also requires both locks.
14571458
lldb::SBMutex api_mutex = GetAPIMutex();
1458-
const std::scoped_lock guard(api_mutex, modules_mutex);
1459+
const std::scoped_lock<lldb::SBMutex, std::mutex> guard(
1460+
api_mutex, modules_mutex);
14591461
for (uint32_t i = 0; i < num_modules; ++i) {
14601462
lldb::SBModule module =
14611463
lldb::SBTarget::GetModuleAtIndexFromEvent(i, event);

0 commit comments

Comments
 (0)