Skip setting thread priorities in NaCl.
Fixes Chromium build since PlatformThread is now built under NaCl. BUG= R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/1472083002 . Cr-Commit-Position: refs/heads/master@{#10777}
This commit is contained in:
@ -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, ¶m) == 0;
|
||||
#endif // defined(WEBRTC_CHROMIUM_BUILD) && defined(WEBRTC_LINUX)
|
||||
#endif // defined(WEBRTC_WIN)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user