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

Unified Diff: base/threading/platform_thread_posix.cc

Issue 9281011: [Mac] In PlatformThread::CurrentId(), use pthread_self() instead of mach_thread_self(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 11 months 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
« no previous file with comments | « base/threading/platform_thread.h ('k') | base/threading/worker_pool_posix_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_posix.cc
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
index 7eda4e97c51169bc28b7fef49ca7466e1ed4eaf2..27e666a870deaf5758d0512abc273563022e90d6 100644
--- a/base/threading/platform_thread_posix.cc
+++ b/base/threading/platform_thread_posix.cc
@@ -16,7 +16,6 @@
#include "base/tracked_objects.h"
#if defined(OS_MACOSX)
-#include <mach/mach.h>
#include <sys/resource.h>
#include <algorithm>
#endif
@@ -132,11 +131,7 @@ bool CreateThread(size_t stack_size, bool joinable,
PlatformThreadId PlatformThread::CurrentId() {
// Pthreads doesn't have the concept of a thread ID, so we have to reach down
// into the kernel.
-#if defined(OS_MACOSX)
- mach_port_t port = mach_thread_self();
- mach_port_deallocate(mach_task_self(), port);
- return port;
-#elif defined(OS_LINUX)
+#if defined(OS_LINUX)
return syscall(__NR_gettid);
#elif defined(OS_ANDROID)
return gettid();
« no previous file with comments | « base/threading/platform_thread.h ('k') | base/threading/worker_pool_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698