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

Unified Diff: base/threading/platform_thread_win.cc

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add id to handle. Created 7 years, 7 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_win.cc
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index 9e877b32f9e1e630ce31c164f5e58680b898e5f7..045d613271e269b49a710e1c0b3dc51caaddeabc 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -103,6 +103,12 @@ PlatformThreadId PlatformThread::CurrentId() {
}
// static
+PlatformThreadHandle PlatformThread::CurrentHandle() {
+ NOTIMPLEMENTED(); // See OpenThread()
+ return kNullThreadHandle;
+}
+
+// static
void PlatformThread::YieldCurrentThread() {
::Sleep(0);
}
@@ -199,6 +205,9 @@ void PlatformThread::SetThreadPriority(PlatformThreadHandle handle,
case kThreadPriority_RealtimeAudio:
::SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);
break;
+ default:
+ NOTREACHED() << "Unknown priority.";
+ break;
}
}

Powered by Google App Engine
This is Rietveld 408576698