summaryrefslogtreecommitdiffstats
path: root/base/platform_thread_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/platform_thread_posix.cc')
-rw-r--r--base/platform_thread_posix.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/base/platform_thread_posix.cc b/base/platform_thread_posix.cc
index 3789715..92a7e22 100644
--- a/base/platform_thread_posix.cc
+++ b/base/platform_thread_posix.cc
@@ -9,7 +9,7 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
-#elif defined(OS_LINUX)
+#else
#include <sys/syscall.h>
#include <unistd.h>
#endif
@@ -35,6 +35,9 @@ PlatformThreadId PlatformThread::CurrentId() {
return mach_thread_self();
#elif defined(OS_LINUX)
return syscall(__NR_gettid);
+#elif defined(OS_FREEBSD)
+ // TODO(BSD): find a better thread ID
+ return reinterpret_cast<int64>(pthread_self());
#endif
}