Revision: 24511
Author:   [email protected]
Date:     Fri Oct 10 07:22:57 2014 UTC
Log:      Sync OS::GetCurrentThreadId with chromium's/blink's implementation

Compare third_party/WebKit/Source/wtf/ThreadingPthreads.cpp

BUG=v8:3620
[email protected]
LOG=n

Review URL: https://codereview.chromium.org/649553002
https://code.google.com/p/v8/source/detail?r=24511

Modified:
 /branches/bleeding_edge/src/base/platform/platform-posix.cc

=======================================
--- /branches/bleeding_edge/src/base/platform/platform-posix.cc Fri Aug 29 09:39:28 2014 UTC +++ /branches/bleeding_edge/src/base/platform/platform-posix.cc Fri Oct 10 07:22:57 2014 UTC
@@ -253,14 +253,14 @@


 int OS::GetCurrentThreadId() {
-#if defined(ANDROID)
+#if V8_OS_MACOSX
+  return static_cast<int>(pthread_mac_thread_np(pthread_self()));
+#elif V8_OS_LINUX
   return static_cast<int>(syscall(__NR_gettid));
-#elif defined(SYS_gettid)
-  return static_cast<int>(syscall(SYS_gettid));
+#elif V8_OS_ANDROID
+  return static_cast<int>(gettid());
 #else
-  // PNaCL doesn't have a way to get an integral thread ID, but it doesn't
- // really matter, because we only need it in PerfJitLogger::LogRecordedBuffer.
-  return 0;
+  return reinterpret_cast<int>(pthread_self());
 #endif
 }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to