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

Unified Diff: base/logging.cc

Issue 9169016: mach_port_deallocate() the result of mach_thread_self(), which obtains a port send right. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' 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 | « no previous file | base/threading/platform_thread_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index 149bdda80c88c01e0144e5c88cc9651bf72b5807..f8f528762805701e97813098d3af97b9f4bf8ebf 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -51,6 +51,7 @@ typedef pthread_mutex_t* MutexHandle;
#include "base/eintr_wrapper.h"
#include "base/string_piece.h"
#include "base/synchronization/lock_impl.h"
+#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "base/vlog.h"
#if defined(OS_POSIX)
@@ -129,22 +130,6 @@ int32 CurrentProcessId() {
#endif
}
-int32 CurrentThreadId() {
-#if defined(OS_WIN)
- return GetCurrentThreadId();
-#elif defined(OS_MACOSX)
- return mach_thread_self();
-#elif defined(OS_LINUX)
- return syscall(__NR_gettid);
-#elif defined(OS_ANDROID)
- return gettid();
-#elif defined(OS_NACL)
- return pthread_self();
-#elif defined(OS_POSIX)
- return reinterpret_cast<int64>(pthread_self());
-#endif
-}
-
uint64 TickCount() {
#if defined(OS_WIN)
return GetTickCount();
@@ -690,7 +675,7 @@ void LogMessage::Init(const char* file, int line) {
if (log_process_id)
stream_ << CurrentProcessId() << ':';
if (log_thread_id)
- stream_ << CurrentThreadId() << ':';
+ stream_ << base::PlatformThread::CurrentId() << ':';
if (log_timestamp) {
time_t t = time(NULL);
struct tm local_time = {0};
« no previous file with comments | « no previous file | base/threading/platform_thread_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698