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

Unified Diff: webrtc/base/platform_thread.cc

Issue 2725573002: Reland of Use sched_yield on all POSIX platforms in PlatformThread. (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/platform_thread.cc
diff --git a/webrtc/base/platform_thread.cc b/webrtc/base/platform_thread.cc
index 525f0ddf08d7e5959383c5c821dc36b823d4cc39..bb838a25537196faff0cb8fce89f5cdf47b37eb2 100644
--- a/webrtc/base/platform_thread.cc
+++ b/webrtc/base/platform_thread.cc
@@ -221,9 +221,6 @@
return;
}
// TODO(tommi): Delete the below.
-#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
- const struct timespec ts_null = {0};
-#endif
do {
// The interface contract of Start/Stop is that for a successful call to
// Start, there should be at least one call to the run function. So we
@@ -235,11 +232,7 @@
SleepEx(0, true);
} while (!stop_);
#else
-#if defined(WEBRTC_MAC)
sched_yield();
-#else
- nanosleep(&ts_null, nullptr);
-#endif
} while (!AtomicOps::AcquireLoad(&stop_flag_));
#endif // defined(WEBRTC_WIN)
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698