summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Thread.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2016-01-29 16:39:32 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2016-01-29 16:39:32 -0500
commitea3a457091565e9d903abd9b75c9a4c209359aa8 (patch)
treed119bfd6f48100ce4913dbab81a33f5174bb67df /Source/Core/Common/Thread.cpp
parente0869288063b4d7836cc54be73ca3ccc4bc1b706 (diff)
parent231daa2da1f3e6d172754a19939aa0bf32f21bc0 (diff)
Merge pull request #3573 from degasus/fifoplayer
Fifoplayer: Fix dual core
Diffstat (limited to 'Source/Core/Common/Thread.cpp')
-rw-r--r--Source/Core/Common/Thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/Thread.cpp b/Source/Core/Common/Thread.cpp
index ad0436c3ae..29420dd170 100644
--- a/Source/Core/Common/Thread.cpp
+++ b/Source/Core/Common/Thread.cpp
@@ -136,7 +136,8 @@ void SetCurrentThreadName(const char* szThreadName)
#elif defined __FreeBSD__
pthread_set_name_np(pthread_self(), szThreadName);
#else
- pthread_setname_np(pthread_self(), szThreadName);
+ // linux doesn't allow to set more than 16 bytes, including \0.
+ pthread_setname_np(pthread_self(), std::string(szThreadName).substr(0, 15).c_str());
#endif
#ifdef USE_VTUNE
// VTune uses OS thread names by default but probably supports longer names when set via its own API.