Pārlūkot izejas kodu

implement setting thread name on macOS/iOS

Andrey Filipenkov 4 gadi atpakaļ
vecāks
revīzija
d6f8e4328c
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      lib/CThreadHelper.cpp

+ 2 - 0
lib/CThreadHelper.cpp

@@ -84,5 +84,7 @@ void setThreadName(const std::string &name)
 
 #elif defined(__linux__)
 	prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
+#elif defined(VCMI_APPLE)
+    pthread_setname_np(name.c_str());
 #endif
 }