| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RUNTIME_BIN_THREAD_H_ | 5 #ifndef RUNTIME_BIN_THREAD_H_ |
| 6 #define RUNTIME_BIN_THREAD_H_ | 6 #define RUNTIME_BIN_THREAD_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| 11 namespace bin { | 11 namespace bin { |
| 12 class Thread; | 12 class Thread; |
| 13 class Mutex; | 13 class Mutex; |
| 14 class Monitor; | 14 class Monitor; |
| 15 } | 15 } |
| 16 } | 16 } |
| 17 | 17 |
| 18 // Declare the OS-specific types ahead of defining the generic classes. | 18 // Declare the OS-specific types ahead of defining the generic classes. |
| 19 #if defined(TARGET_OS_ANDROID) | 19 #if defined(HOST_OS_ANDROID) |
| 20 #include "bin/thread_android.h" | 20 #include "bin/thread_android.h" |
| 21 #elif defined(TARGET_OS_FUCHSIA) | 21 #elif defined(HOST_OS_FUCHSIA) |
| 22 #include "bin/thread_fuchsia.h" | 22 #include "bin/thread_fuchsia.h" |
| 23 #elif defined(TARGET_OS_LINUX) | 23 #elif defined(HOST_OS_LINUX) |
| 24 #include "bin/thread_linux.h" | 24 #include "bin/thread_linux.h" |
| 25 #elif defined(TARGET_OS_MACOS) | 25 #elif defined(HOST_OS_MACOS) |
| 26 #include "bin/thread_macos.h" | 26 #include "bin/thread_macos.h" |
| 27 #elif defined(TARGET_OS_WINDOWS) | 27 #elif defined(HOST_OS_WINDOWS) |
| 28 #include "bin/thread_win.h" | 28 #include "bin/thread_win.h" |
| 29 #else | 29 #else |
| 30 #error Unknown target os. | 30 #error Unknown target os. |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 namespace dart { | 33 namespace dart { |
| 34 namespace bin { | 34 namespace bin { |
| 35 | 35 |
| 36 class Thread { | 36 class Thread { |
| 37 public: | 37 public: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 MonitorData data_; // OS-specific data. | 104 MonitorData data_; // OS-specific data. |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(Monitor); | 106 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace bin | 109 } // namespace bin |
| 110 } // namespace dart | 110 } // namespace dart |
| 111 | 111 |
| 112 | 112 |
| 113 #endif // RUNTIME_BIN_THREAD_H_ | 113 #endif // RUNTIME_BIN_THREAD_H_ |
| OLD | NEW |