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

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

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 #include "base/threading/platform_thread_internal_posix.h"
6
7 #include "base/logging.h"
8
9 namespace base {
10
11 namespace internal {
12
13 int ThreadPriorityToNiceValue(ThreadPriority priority) {
14 for (const ThreadPriorityToNiceValuePair& pair :
15 kThreadPriorityToNiceValueMap) {
16 if (pair.priority == priority)
17 return pair.nice_value;
18 }
19 NOTREACHED() << "Unknown ThreadPriority";
20 return 0;
21 }
22
23 } // namespace internal
24
25 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/platform_thread_internal_posix.h ('k') | base/threading/platform_thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698