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

Unified Diff: webrtc/base/platform_thread.cc

Issue 1472083002: Skip setting thread priorities in NaCl. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 02ec3af29c99b2f652b2d1490b588da5d4e66ecc..a0e37efc8e94143f2b6a7ea27c331c14fd8bb024 100644
--- a/webrtc/base/platform_thread.cc
+++ b/webrtc/base/platform_thread.cc
@@ -202,14 +202,16 @@ void PlatformThread::Run() {
bool PlatformThread::SetPriority(ThreadPriority priority) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
-#if defined(WEBRTC_WIN)
- return thread_ && SetThreadPriority(thread_, priority);
-#else
if (!thread_)
return false;
-#if defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
- // TODO(tommi): Switch to the same mechanism as Chromium uses for
- // changing thread priorities.
+#if defined(WEBRTC_WIN)
+ return SetThreadPriority(thread_, priority);
+#elif defined(__native_client__)
+ // Setting thread priorities is not supported in NaCl.
+ return true;
+#elif defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
+ // TODO(tommi): Switch to the same mechanism as Chromium uses for changing
+ // thread priorities.
return true;
#else
#ifdef WEBRTC_THREAD_RR
@@ -250,7 +252,6 @@ bool PlatformThread::SetPriority(ThreadPriority priority) {
break;
}
return pthread_setschedparam(thread_, policy, &param) == 0;
-#endif // defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
#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