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

Side by Side Diff: base/threading/platform_thread_internal_posix.h

Issue 1015503002: Deduplicate PlatformThread's POSIX implementations of SetThreadPriority. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_threads
Patch Set: tweak comment 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_
6 #define BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_
7
8 #include "base/threading/platform_thread.h"
9
10 namespace base {
11
12 namespace internal {
13
14 struct ThreadPriorityToNiceValuePair {
15 ThreadPriority priority;
16 int nice_value;
17 };
18 extern const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4];
19
20 // Returns the nice value matching |priority| based on the platform-specific
21 // implementation of kThreadPriorityToNiceValueMap.
22 int ThreadPriorityToNiceValue(ThreadPriority priority);
23
24 // Allows platform specific tweaks to the generic POSIX solution for
25 // SetThreadPriority. Returns true if the platform-specific implementation
26 // handled this |priority| change, false if the generic implementation should
27 // instead proceed.
28 bool HandleSetThreadPriorityForPlatform(PlatformThreadHandle handle,
29 ThreadPriority priority);
30
31 } // namespace internal
32
33 } // namespace base
34
35 #endif // BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_
OLDNEW
« no previous file with comments | « base/threading/platform_thread_freebsd.cc ('k') | base/threading/platform_thread_internal_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698