| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 VM_OS_H_ | 5 #ifndef VM_OS_H_ |
| 6 #define VM_OS_H_ | 6 #define VM_OS_H_ |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 | 9 |
| 10 // Forward declarations. | 10 // Forward declarations. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // preferred code alignment on all platforms. | 71 // preferred code alignment on all platforms. |
| 72 static const int kMaxPreferredCodeAlignment = 32; | 72 static const int kMaxPreferredCodeAlignment = 32; |
| 73 | 73 |
| 74 // Returns the preferred code alignment or zero if | 74 // Returns the preferred code alignment or zero if |
| 75 // the platform doesn't care. Guaranteed to be a power of two. | 75 // the platform doesn't care. Guaranteed to be a power of two. |
| 76 static word PreferredCodeAlignment(); | 76 static word PreferredCodeAlignment(); |
| 77 | 77 |
| 78 // Returns the stack size limit. | 78 // Returns the stack size limit. |
| 79 static uword GetStackSizeLimit(); | 79 static uword GetStackSizeLimit(); |
| 80 | 80 |
| 81 // Returns true if StackFrameIterator can be used from an isolate that isn't |
| 82 // the calling thread's current isolate. |
| 83 static bool AllowStackFrameIteratorFromAnotherThread(); |
| 84 |
| 81 // Returns number of available processor cores. | 85 // Returns number of available processor cores. |
| 82 static int NumberOfAvailableProcessors(); | 86 static int NumberOfAvailableProcessors(); |
| 83 | 87 |
| 84 // Sleep the currently executing thread for millis ms. | 88 // Sleep the currently executing thread for millis ms. |
| 85 static void Sleep(int64_t millis); | 89 static void Sleep(int64_t millis); |
| 86 | 90 |
| 87 // Sleep the currently executing thread for micros microseconds. | 91 // Sleep the currently executing thread for micros microseconds. |
| 88 static void SleepMicros(int64_t micros); | 92 static void SleepMicros(int64_t micros); |
| 89 | 93 |
| 90 // Debug break. | 94 // Debug break. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 static void Shutdown(); | 141 static void Shutdown(); |
| 138 | 142 |
| 139 static void Abort(); | 143 static void Abort(); |
| 140 | 144 |
| 141 static void Exit(int code); | 145 static void Exit(int code); |
| 142 }; | 146 }; |
| 143 | 147 |
| 144 } // namespace dart | 148 } // namespace dart |
| 145 | 149 |
| 146 #endif // VM_OS_H_ | 150 #endif // VM_OS_H_ |
| OLD | NEW |