From ac82ecf387c6412bdb49c8dcca0e8c8e11ff67e5 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 11 Mar 2018 19:30:44 +0300 Subject: [PATCH] Use pthread_setname_np (Linux, GDB) --- Utilities/Thread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 9e8a70289a..5dd766f729 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1639,6 +1639,10 @@ void thread_ctrl::initialize() } } #endif + +#ifndef _WIN32 + pthread_setname_np(pthread_self(), m_name.substr(0, 15).c_str()); +#endif } void thread_ctrl::finalize(std::exception_ptr eptr) noexcept