| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Returns the stack size limit. | 51 // Returns the stack size limit. |
| 52 static uword GetStackSizeLimit(); | 52 static uword GetStackSizeLimit(); |
| 53 | 53 |
| 54 // Returns number of available processor cores. | 54 // Returns number of available processor cores. |
| 55 static int NumberOfAvailableProcessors(); | 55 static int NumberOfAvailableProcessors(); |
| 56 | 56 |
| 57 // Sleep the currently executing thread for millis ms. | 57 // Sleep the currently executing thread for millis ms. |
| 58 static void Sleep(int64_t millis); | 58 static void Sleep(int64_t millis); |
| 59 | 59 |
| 60 // Debug break. | |
| 61 static void DebugBreak(); | |
| 62 | |
| 63 // Print formatted output to stdout/stderr for debugging. | 60 // Print formatted output to stdout/stderr for debugging. |
| 64 static void Print(const char* format, ...); | 61 static void Print(const char* format, ...); |
| 65 static void PrintErr(const char* format, ...); | 62 static void PrintErr(const char* format, ...); |
| 66 static void VFPrint(FILE* stream, const char* format, va_list args); | 63 static void VFPrint(FILE* stream, const char* format, va_list args); |
| 67 // Print formatted output info a buffer. | 64 // Print formatted output info a buffer. |
| 68 // Does not write more than size characters (including the trailing '\0'). | 65 // Does not write more than size characters (including the trailing '\0'). |
| 69 // Returns the number of characters (excluding the trailing '\0') that would | 66 // Returns the number of characters (excluding the trailing '\0') that would |
| 70 // been written if the buffer had been big enough. | 67 // been written if the buffer had been big enough. |
| 71 // If the return value is greater or equal than the given size then the output | 68 // If the return value is greater or equal than the given size then the output |
| 72 // has been truncated. | 69 // has been truncated. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 87 static void Shutdown(); | 84 static void Shutdown(); |
| 88 | 85 |
| 89 static void Abort(); | 86 static void Abort(); |
| 90 | 87 |
| 91 static void Exit(int code); | 88 static void Exit(int code); |
| 92 }; | 89 }; |
| 93 | 90 |
| 94 } // namespace dart | 91 } // namespace dart |
| 95 | 92 |
| 96 #endif // VM_OS_H_ | 93 #endif // VM_OS_H_ |
| OLD | NEW |