summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2018-01-28 23:45:02 +0100
committerMichael Lutz <michi@icosahedron.de>2018-04-10 23:30:01 +0200
commitf670277ff5ecd9843f379551265ce2ead05134f2 (patch)
treeaf414016a6dd67788f98bb56453886f1de4172d2 /src/thread
parent4971678f521f945b9f6f47042d33d610db43962d (diff)
downloadopenttd-f670277ff5ecd9843f379551265ce2ead05134f2.tar.xz
Codechange: [OSX] Try to set the thread name for debugger display.
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/thread_pthread.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/thread/thread_pthread.cpp b/src/thread/thread_pthread.cpp
index 747b8943d..8aed5ee13 100644
--- a/src/thread/thread_pthread.cpp
+++ b/src/thread/thread_pthread.cpp
@@ -14,6 +14,10 @@
#include <pthread.h>
#include <errno.h>
+#if defined(__APPLE__)
+#include "../os/macosx/macos.h"
+#endif
+
#include "../safeguards.h"
/**
@@ -70,6 +74,9 @@ private:
}
#endif
#endif
+#if defined(__APPLE__)
+ MacOSSetThreadName(self->name);
+#endif
self->ThreadProc();
pthread_exit(NULL);
}