mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-28 16:00:40 -04:00
Implement OSSetCurrentThreadName on macOS
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#if _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#elif __APPLE__
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
@@ -722,6 +724,8 @@ void OSSetCurrentThreadName(const char* name) {
|
||||
if (!SUCCEEDED(result)) {
|
||||
CRASH("OSSetThreadName: SetThreadDescription failed");
|
||||
}
|
||||
#elif __APPLE__
|
||||
pthread_setname_np(name);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user