summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Thread.cpp
diff options
context:
space:
mode:
authorshuffle2 <godisgovernment@gmail.com>2017-06-07 21:20:06 -0700
committerGitHub <noreply@github.com>2017-06-07 21:20:06 -0700
commitffd8309aca806a6cf5ca4da85f5854ef14c8e0d9 (patch)
treeba029b5a68e1613f3dca3185a854ef70d05de61e /Source/Core/Common/Thread.cpp
parenta2358786dc66eab8fa63987751d4e3fc1a3ee525 (diff)
parent9ee63608b3c7160cadb0291e577b158d1b8aa5c6 (diff)
Merge branch 'master' into fix-unittests
Diffstat (limited to 'Source/Core/Common/Thread.cpp')
-rw-r--r--Source/Core/Common/Thread.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/Common/Thread.cpp b/Source/Core/Common/Thread.cpp
index 190653ee31..fa81314795 100644
--- a/Source/Core/Common/Thread.cpp
+++ b/Source/Core/Common/Thread.cpp
@@ -62,11 +62,8 @@ void SwitchCurrentThread()
}
// Sets the debugger-visible name of the current thread.
-// Uses undocumented (actually, it is now documented) trick.
-// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtsksettingthreadname.asp
-
-// This is implemented much nicer in upcoming msvc++, see:
-// http://msdn.microsoft.com/en-us/library/xcb2z8hs(VS.100).aspx
+// Uses trick documented in:
+// https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code
void SetCurrentThreadName(const char* szThreadName)
{
static const DWORD MS_VC_EXCEPTION = 0x406D1388;
@@ -83,7 +80,7 @@ void SetCurrentThreadName(const char* szThreadName)
info.dwType = 0x1000;
info.szName = szThreadName;
- info.dwThreadID = -1; // dwThreadID;
+ info.dwThreadID = static_cast<DWORD>(-1);
info.dwFlags = 0;
__try