mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 23:58:59 +00:00
Thread: Limit thread name to 15 bytes on linux.
This commit is contained in:
parent
a4a2928905
commit
231daa2da1
1 changed files with 2 additions and 1 deletions
|
@ -136,7 +136,8 @@ void SetCurrentThreadName(const char* szThreadName)
|
||||||
#elif defined __FreeBSD__
|
#elif defined __FreeBSD__
|
||||||
pthread_set_name_np(pthread_self(), szThreadName);
|
pthread_set_name_np(pthread_self(), szThreadName);
|
||||||
#else
|
#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
|
#endif
|
||||||
#ifdef USE_VTUNE
|
#ifdef USE_VTUNE
|
||||||
// VTune uses OS thread names by default but probably supports longer names when set via its own API.
|
// VTune uses OS thread names by default but probably supports longer names when set via its own API.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue