summaryrefslogtreecommitdiffstats
path: root/base/platform_thread_posix.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-29 00:32:52 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-29 00:32:52 +0000
commite43eddf1a5887c4b249af3daa024c1107ce254a1 (patch)
tree994df09c627978ef3fb93a9fadebd00bebbcb31d /base/platform_thread_posix.cc
parenta672cb9dce10306f3b149802653dbb554b326a44 (diff)
downloadchromium_src-e43eddf1a5887c4b249af3daa024c1107ce254a1.zip
chromium_src-e43eddf1a5887c4b249af3daa024c1107ce254a1.tar.gz
chromium_src-e43eddf1a5887c4b249af3daa024c1107ce254a1.tar.bz2
Changes to base/ from a combination of FreeBSD and OpenBSD patches.
Review URL: http://codereview.chromium.org/495002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35321 0039d316-1c4b-4281-b951-d872f2087c98
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
}