OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/threading/platform_thread.h" | 5 #include "base/threading/platform_thread.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 #include <sched.h> | 9 #include <sched.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 if (errno != 0) { | 252 if (errno != 0) { |
253 DVPLOG(1) << "Failed to get nice value of thread (" | 253 DVPLOG(1) << "Failed to get nice value of thread (" |
254 << PlatformThread::CurrentId() << ")"; | 254 << PlatformThread::CurrentId() << ")"; |
255 return ThreadPriority::NORMAL; | 255 return ThreadPriority::NORMAL; |
256 } | 256 } |
257 | 257 |
258 return internal::NiceValueToThreadPriority(nice_value); | 258 return internal::NiceValueToThreadPriority(nice_value); |
259 #endif // !defined(OS_NACL) | 259 #endif // !defined(OS_NACL) |
260 } | 260 } |
261 | 261 |
| 262 // static |
| 263 bool PlatformThread::SetChildThreadPriorityInCurrentProcess( |
| 264 PlatformThreadHandle thread_handle, |
| 265 PlatformThreadId tid, |
| 266 ThreadPriority priority) { |
| 267 // FIXME: Add check for caller process and thread's process. |
| 268 return internal::SetChildThreadPriorityInCurrentProcess(tid, priority); |
| 269 } |
| 270 |
262 #endif // !defined(OS_MACOSX) | 271 #endif // !defined(OS_MACOSX) |
263 | 272 |
264 } // namespace base | 273 } // namespace base |
OLD | NEW |