Reviewers: Sven Panne,
Description:
[base] Drop obsolete Thread::YieldCPU.
The method is not used anywhere, and it is a bad idea in general anyway.
If you see a need to call YieldCPU, then you're code is probably in need
of a redesign!
R=svenpa...@chromium.org
Please review this at https://codereview.chromium.org/1116853002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -20 lines):
M src/base/platform/platform.h
M src/base/platform/platform-posix.cc
M src/base/platform/platform-win32.cc
Index: src/base/platform/platform-posix.cc
diff --git a/src/base/platform/platform-posix.cc
b/src/base/platform/platform-posix.cc
index
8fb40b0bc0c6b200d87782b6e2b3d89de44e3a22..78b8d782580e4a2897aa0da8e7196bef7aed4f4b
100644
--- a/src/base/platform/platform-posix.cc
+++ b/src/base/platform/platform-posix.cc
@@ -631,13 +631,6 @@ void Thread::Join() {
}
-void Thread::YieldCPU() {
- int result = sched_yield();
- DCHECK_EQ(0, result);
- USE(result);
-}
-
-
static Thread::LocalStorageKey PthreadKeyToLocalKey(pthread_key_t
pthread_key) {
#if V8_OS_CYGWIN
// We need to cast pthread_key_t to Thread::LocalStorageKey in two steps
@@ -761,5 +754,5 @@ void Thread::SetThreadLocal(LocalStorageKey key, void*
value) {
USE(result);
}
-
-} } // namespace v8::base
+} // namespace base
+} // namespace v8
Index: src/base/platform/platform-win32.cc
diff --git a/src/base/platform/platform-win32.cc
b/src/base/platform/platform-win32.cc
index
b0677afad55cb84545ac92989196db1522985c3f..397b7a9f71e7b4b4a57150c2bc2f1cc0ee709a07
100644
--- a/src/base/platform/platform-win32.cc
+++ b/src/base/platform/platform-win32.cc
@@ -1384,10 +1384,5 @@ void Thread::SetThreadLocal(LocalStorageKey key,
void* value) {
DCHECK(result);
}
-
-
-void Thread::YieldCPU() {
- Sleep(0);
-}
-
-} } // namespace v8::base
+} // namespace base
+} // namespace v8
Index: src/base/platform/platform.h
diff --git a/src/base/platform/platform.h b/src/base/platform/platform.h
index
2d837baff61078fedd74626491dc28db8d3bf930..f54eef3c44f10da76a21ab2f04dbc4bea5feceec
100644
--- a/src/base/platform/platform.h
+++ b/src/base/platform/platform.h
@@ -446,10 +446,6 @@ class Thread {
}
#endif
- // A hint to the scheduler to let another thread run.
- static void YieldCPU();
-
-
// The thread name length is limited to 16 based on Linux's
implementation of
// prctl().
static const int kMaxThreadNameLength = 16;
--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.