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

Unified Diff: base/threading/platform_thread_mac.mm

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added back JNI for Audio. Created 7 years, 8 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
Index: base/threading/platform_thread_mac.mm
diff --git a/base/threading/platform_thread_mac.mm b/base/threading/platform_thread_mac.mm
index 48041a06a4f0ba8b3e44b1fc3e19ff748a46942c..79b3b9176b4139af0eec98bb1dbd27a3bd4a8526 100644
--- a/base/threading/platform_thread_mac.mm
+++ b/base/threading/platform_thread_mac.mm
@@ -161,6 +161,7 @@ void SetPriorityRealtimeAudio(mach_port_t mach_thread_id) {
// static
void PlatformThread::SetThreadPriority(PlatformThreadHandle handle,
+ PlatformThreadId,
ThreadPriority priority) {
// Convert from pthread_t to mach thread identifier.
mach_port_t mach_thread_id = pthread_mach_thread_np(handle);
@@ -172,6 +173,9 @@ void PlatformThread::SetThreadPriority(PlatformThreadHandle handle,
case kThreadPriority_RealtimeAudio:
SetPriorityRealtimeAudio(mach_thread_id);
break;
+ default:
+ NOTREACHED() << "Unknown priority.";
+ break;
}
}

Powered by Google App Engine
This is Rietveld 408576698