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 | 71 |
72 // Returns the stack size limit. | 72 // Returns the stack size limit. |
73 static uword GetStackSizeLimit(); | 73 static uword GetStackSizeLimit(); |
74 | 74 |
75 // Returns number of available processor cores. | 75 // Returns number of available processor cores. |
76 static int NumberOfAvailableProcessors(); | 76 static int NumberOfAvailableProcessors(); |
77 | 77 |
78 // Sleep the currently executing thread for millis ms. | 78 // Sleep the currently executing thread for millis ms. |
79 static void Sleep(int64_t millis); | 79 static void Sleep(int64_t millis); |
80 | 80 |
| 81 // Debug break. |
| 82 static void DebugBreak(); |
| 83 |
81 // Print formatted output to stdout/stderr for debugging. | 84 // Print formatted output to stdout/stderr for debugging. |
82 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 85 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
83 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 86 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
84 static void VFPrint(FILE* stream, const char* format, va_list args); | 87 static void VFPrint(FILE* stream, const char* format, va_list args); |
85 // Print formatted output info a buffer. | 88 // Print formatted output info a buffer. |
86 // | 89 // |
87 // Does not write more than size characters (including the trailing '\0'). | 90 // Does not write more than size characters (including the trailing '\0'). |
88 // | 91 // |
89 // Returns the number of characters (excluding the trailing '\0') | 92 // Returns the number of characters (excluding the trailing '\0') |
90 // that would been written if the buffer had been big enough. If | 93 // that would been written if the buffer had been big enough. If |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 static void Shutdown(); | 125 static void Shutdown(); |
123 | 126 |
124 static void Abort(); | 127 static void Abort(); |
125 | 128 |
126 static void Exit(int code); | 129 static void Exit(int code); |
127 }; | 130 }; |
128 | 131 |
129 } // namespace dart | 132 } // namespace dart |
130 | 133 |
131 #endif // VM_OS_H_ | 134 #endif // VM_OS_H_ |
OLD | NEW |