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 <sched.h> | 8 #include <sched.h> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #if defined(OS_LINUX) | 23 #if defined(OS_LINUX) |
24 #include <sys/prctl.h> | 24 #include <sys/prctl.h> |
25 #include <sys/syscall.h> | 25 #include <sys/syscall.h> |
26 #include <unistd.h> | 26 #include <unistd.h> |
27 #endif | 27 #endif |
28 | 28 |
29 #if defined(OS_ANDROID) | 29 #if defined(OS_ANDROID) |
30 #include "base/android/jni_android.h" | 30 #include "base/android/jni_android.h" |
31 #endif | 31 #endif |
32 | 32 |
| 33 // TODO(bbudge) Use time.h when NaCl toolchain supports _POSIX_TIMERS |
| 34 #if defined(OS_NACL) |
| 35 #include <sys/nacl_syscalls.h> |
| 36 #endif |
| 37 |
33 namespace base { | 38 namespace base { |
34 | 39 |
35 #if defined(OS_MACOSX) | 40 #if defined(OS_MACOSX) |
36 void InitThreading(); | 41 void InitThreading(); |
37 #endif | 42 #endif |
38 | 43 |
39 namespace { | 44 namespace { |
40 | 45 |
41 #if !defined(OS_MACOSX) | 46 #if !defined(OS_MACOSX) |
42 // Mac name code is in in platform_thread_mac.mm. | 47 // Mac name code is in in platform_thread_mac.mm. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // Mac OS X uses lower-level mach APIs | 251 // Mac OS X uses lower-level mach APIs |
247 | 252 |
248 // static | 253 // static |
249 void PlatformThread::SetThreadPriority(PlatformThreadHandle, ThreadPriority) { | 254 void PlatformThread::SetThreadPriority(PlatformThreadHandle, ThreadPriority) { |
250 // TODO(crogers): implement | 255 // TODO(crogers): implement |
251 NOTIMPLEMENTED(); | 256 NOTIMPLEMENTED(); |
252 } | 257 } |
253 #endif | 258 #endif |
254 | 259 |
255 } // namespace base | 260 } // namespace base |
OLD | NEW |