Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: base/platform_thread_posix.cc

Issue 495002: Changes to base/ from a combination of FreeBSD and OpenBSD patches. (Closed)
Patch Set: minor tweaks Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/platform_thread_posix.cc
diff --git a/base/platform_thread_posix.cc b/base/platform_thread_posix.cc
index 37897159e3a9a1506660b9038400618fb5512156..92a7e224dd3eaccf793a30d5882c08d6c8026617 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
}
« base/message_loop.h ('K') | « base/native_library.h ('k') | base/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698