| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 static void Sleep(int64_t millis); | 103 static void Sleep(int64_t millis); |
| 104 | 104 |
| 105 // Sleep the currently executing thread for micros microseconds. | 105 // Sleep the currently executing thread for micros microseconds. |
| 106 static void SleepMicros(int64_t micros); | 106 static void SleepMicros(int64_t micros); |
| 107 | 107 |
| 108 // Debug break. | 108 // Debug break. |
| 109 static void DebugBreak(); | 109 static void DebugBreak(); |
| 110 | 110 |
| 111 // Not all platform support strndup. | 111 // Not all platform support strndup. |
| 112 static char* StrNDup(const char* s, intptr_t n); | 112 static char* StrNDup(const char* s, intptr_t n); |
| 113 static intptr_t StrNLen(const char* s, intptr_t n); |
| 113 | 114 |
| 114 // Print formatted output to stdout/stderr for debugging. | 115 // Print formatted output to stdout/stderr for debugging. |
| 115 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 116 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
| 116 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 117 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
| 117 static void VFPrint(FILE* stream, const char* format, va_list args); | 118 static void VFPrint(FILE* stream, const char* format, va_list args); |
| 118 // Print formatted output info a buffer. | 119 // Print formatted output info a buffer. |
| 119 // | 120 // |
| 120 // Does not write more than size characters (including the trailing '\0'). | 121 // Does not write more than size characters (including the trailing '\0'). |
| 121 // | 122 // |
| 122 // Returns the number of characters (excluding the trailing '\0') | 123 // Returns the number of characters (excluding the trailing '\0') |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 static void Shutdown(); | 163 static void Shutdown(); |
| 163 | 164 |
| 164 static void Abort(); | 165 static void Abort(); |
| 165 | 166 |
| 166 static void Exit(int code); | 167 static void Exit(int code); |
| 167 }; | 168 }; |
| 168 | 169 |
| 169 } // namespace dart | 170 } // namespace dart |
| 170 | 171 |
| 171 #endif // VM_OS_H_ | 172 #endif // VM_OS_H_ |
| OLD | NEW |