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

Unified Diff: base/threading/platform_thread_internal_posix.h

Issue 1006933003: Add full SetThreadPriority support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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_internal_posix.h
diff --git a/base/threading/platform_thread_internal_posix.h b/base/threading/platform_thread_internal_posix.h
index 1ae968fff087d0452af7f36c9a328027a26164b4..4c0705b8be204b57bcd92b9a525eb520850b52aa 100644
--- a/base/threading/platform_thread_internal_posix.h
+++ b/base/threading/platform_thread_internal_posix.h
@@ -21,6 +21,10 @@ extern const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4];
// implementation of kThreadPriorityToNiceValueMap.
int ThreadPriorityToNiceValue(ThreadPriority priority);
+// Returns the ThreadPrioirty matching |nice_value| based on the platform-
+// specific implementation of kThreadPriorityToNiceValueMap.
+ThreadPriority NiceValueToThreadPriority(int nice_value);
+
// Allows platform specific tweaks to the generic POSIX solution for
// SetThreadPriority. Returns true if the platform-specific implementation
// handled this |priority| change, false if the generic implementation should
@@ -28,6 +32,13 @@ int ThreadPriorityToNiceValue(ThreadPriority priority);
bool HandleSetThreadPriorityForPlatform(PlatformThreadHandle handle,
ThreadPriority priority);
+// Mirrors HandleSetThreadPriorityForPlatform(). Returns true if there is a
rvargas (doing something else) 2015/03/19 22:19:21 I think we should remove the first sentence. Just
gab 2015/03/30 20:14:45 Done.
+// platform-specific ThreadPriority set on |handle| (and returns the actual
+// ThreadPriority via |priority|). Returns false otherwise, leaving |priority|
+// untouched.
+bool HandleGetThreadPriorityForPlatform(PlatformThreadHandle handle,
rvargas (doing something else) 2015/03/19 22:19:21 I know I just said that this was ok, but reading t
gab 2015/03/30 20:14:45 Done.
+ ThreadPriority* priority);
+
} // namespace internal
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698