[redcode/crythread-2nd-pass] replaced instances of AZStd::lock_guard<> with AZStd::scoped_lock as per feedback

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-08-12 12:40:03 -07:00
parent 72e99dd52b
commit cc3d2e9969
8 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -154,13 +154,13 @@ void DebugCallStack::SetUserDialogEnable(const bool bUserDialogEnable)
DWORD g_idDebugThreads[10];
const char* g_nameDebugThreads[10];
int g_nDebugThreads = 0;
AZStd::spin_mutex g_lockThreadDumpList = 0;
AZStd::spin_mutex g_lockThreadDumpList;
void MarkThisThreadForDebugging(const char* name)
{
EBUS_EVENT(AZ::Debug::EventTraceDrillerSetupBus, SetThreadName, AZStd::this_thread::get_id(), name);
AZStd::lock_guard<AZStd::spin_mutex> lock(g_lockThreadDumpList);
AZStd::scoped_lock lock(g_lockThreadDumpList);
DWORD id = GetCurrentThreadId();
if (g_nDebugThreads == sizeof(g_idDebugThreads) / sizeof(g_idDebugThreads[0]))
{
@@ -180,7 +180,7 @@ void MarkThisThreadForDebugging(const char* name)
void UnmarkThisThreadFromDebugging()
{
AZStd::lock_guard<AZStd::spin_mutex> lock(g_lockThreadDumpList);
AZStd::scoped_lock lock(g_lockThreadDumpList);
DWORD id = GetCurrentThreadId();
for (int i = g_nDebugThreads - 1; i >= 0; i--)
{