aboutsummaryrefslogtreecommitdiff
path: root/zencore/thread.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-12-15 15:27:37 +0100
committerMartin Ridgers <[email protected]>2021-12-16 09:35:51 +0100
commit7a821d1d95298e4dec60733454856a93140cd73e (patch)
tree79b913710d15854ad7210115ac63ffbf3ac68b76 /zencore/thread.cpp
parentThread naming for Mac (diff)
downloadzen-7a821d1d95298e4dec60733454856a93140cd73e.tar.xz
zen-7a821d1d95298e4dec60733454856a93140cd73e.zip
GetThreadId() for Mac
Diffstat (limited to 'zencore/thread.cpp')
-rw-r--r--zencore/thread.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp
index 9e35e5d57..8fe25b528 100644
--- a/zencore/thread.cpp
+++ b/zencore/thread.cpp
@@ -1041,8 +1041,10 @@ GetCurrentThreadId()
{
#if ZEN_PLATFORM_WINDOWS
return ::GetCurrentThreadId();
-#else
+#elif ZEN_PLATFORM_LINUX
return int(gettid());
+#elif ZEN_PLATFORM_MAC
+ return int(pthread_mach_thread_np(pthread_self()));
#endif
}