Index: base/logging.cc |
=================================================================== |
--- base/logging.cc (revision 118134) |
+++ base/logging.cc (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -51,6 +51,7 @@ |
#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 @@ |
#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 @@ |
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}; |