diff options
author | Lioncash <mathew1800@gmail.com> | 2018-11-22 03:53:35 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-11-22 06:40:26 +0100 |
commit | 1bf5a337a599e4be611711881a2b7fdf98baeb72 (patch) | |
tree | f34df1d99d1627624bc63f57d8f7126376e81195 /src/common/thread.cpp | |
parent | common/thread: Make Barrier's 'count' member non-const (diff) | |
download | yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.tar yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.tar.gz yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.tar.bz2 yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.tar.lz yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.tar.xz yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.tar.zst yuzu-1bf5a337a599e4be611711881a2b7fdf98baeb72.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/thread.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 4bcb65236..5144c0d9f 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -45,7 +45,7 @@ void SwitchCurrentThread() { // This is implemented much nicer in upcoming msvc++, see: // http://msdn.microsoft.com/en-us/library/xcb2z8hs(VS.100).aspx -void SetCurrentThreadName(const char* szThreadName) { +void SetCurrentThreadName(const char* name) { static const DWORD MS_VC_EXCEPTION = 0x406D1388; #pragma pack(push, 8) @@ -58,7 +58,7 @@ void SetCurrentThreadName(const char* szThreadName) { #pragma pack(pop) info.dwType = 0x1000; - info.szName = szThreadName; + info.szName = name; info.dwThreadID = -1; // dwThreadID; info.dwFlags = 0; @@ -97,15 +97,15 @@ void SwitchCurrentThread() { // MinGW with the POSIX threading model does not support pthread_setname_np #if !defined(_WIN32) || defined(_MSC_VER) -void SetCurrentThreadName(const char* szThreadName) { +void SetCurrentThreadName(const char* name) { #ifdef __APPLE__ - pthread_setname_np(szThreadName); + pthread_setname_np(name); #elif defined(__Bitrig__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) - pthread_set_name_np(pthread_self(), szThreadName); + pthread_set_name_np(pthread_self(), name); #elif defined(__NetBSD__) - pthread_setname_np(pthread_self(), "%s", (void*)szThreadName); + pthread_setname_np(pthread_self(), "%s", (void*)name); #else - pthread_setname_np(pthread_self(), szThreadName); + pthread_setname_np(pthread_self(), name); #endif } #endif |