Chromium Code Reviews| Index: base/threading/platform_thread_internal_posix.cc |
| diff --git a/base/threading/platform_thread_internal_posix.cc b/base/threading/platform_thread_internal_posix.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..85160cb23717f44b1a05721466692295edc88c43 |
| --- /dev/null |
| +++ b/base/threading/platform_thread_internal_posix.cc |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/threading/platform_thread_internal_posix.h" |
| + |
| +#include "base/logging.h" |
| + |
| +namespace base { |
| + |
| +namespace internal { |
| + |
| +int ThreadPriorityToNiceValue(ThreadPriority priority) { |
| + for (const ThreadPriorityToNiceValuePair& tnp : |
|
rvargas (doing something else)
2015/03/17 22:15:21
nit: don't abbreviate tnp
gab
2015/03/18 19:01:05
how about "pair"? Or do you prefer something verbo
rvargas (doing something else)
2015/03/18 22:54:23
"pair" is fine
|
| + kThreadPriorityToNiceValueMap) { |
| + if (tnp.priority == priority) |
| + return tnp.nice_value; |
| + } |
| + NOTREACHED() << "Unknown ThreadPriority"; |
| + return 0; |
| +} |
| + |
| +} // namespace internal |
| + |
| +} // namespace base |