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

Unified Diff: base/threading/platform_thread_internal_posix.h

Issue 1870033002: Fix NiceValueToThreadPriority failing on an unknown nice value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment about exclusion of OSX/iOS. Created 4 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
« no previous file with comments | « no previous file | base/threading/platform_thread_internal_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 05a8d1e26e78bd56d4e539110aad330a4ed01b1d..5f4a215968b60dbd61f067280bd958364b498353 100644
--- a/base/threading/platform_thread_internal_posix.h
+++ b/base/threading/platform_thread_internal_posix.h
@@ -5,6 +5,7 @@
#ifndef BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_
#define BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_
+#include "base/base_export.h"
#include "base/threading/platform_thread.h"
namespace base {
@@ -15,7 +16,11 @@ struct ThreadPriorityToNiceValuePair {
ThreadPriority priority;
int nice_value;
};
-extern const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4];
+// The elements must be listed in the order of increasing priority (lowest
+// priority first), that is, in the order of decreasing nice values (highest
+// nice value first).
+BASE_EXPORT extern
+const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4];
// Returns the nice value matching |priority| based on the platform-specific
// implementation of kThreadPriorityToNiceValueMap.
@@ -23,7 +28,7 @@ int ThreadPriorityToNiceValue(ThreadPriority priority);
// Returns the ThreadPrioirty matching |nice_value| based on the platform-
// specific implementation of kThreadPriorityToNiceValueMap.
-ThreadPriority NiceValueToThreadPriority(int nice_value);
+BASE_EXPORT ThreadPriority NiceValueToThreadPriority(int nice_value);
// Allows platform specific tweaks to the generic POSIX solution for
// SetCurrentThreadPriority. Returns true if the platform-specific
« no previous file with comments | « no previous file | base/threading/platform_thread_internal_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698