| 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 #include "vm/os.h" | 5 #include "vm/os.h" |
| 6 | 6 |
| 7 #include <time.h> | 7 #include <time.h> |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 GetSystemInfo(&info); | 123 GetSystemInfo(&info); |
| 124 return info.dwNumberOfProcessors; | 124 return info.dwNumberOfProcessors; |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 void OS::Sleep(int64_t millis) { | 128 void OS::Sleep(int64_t millis) { |
| 129 ::Sleep(millis); | 129 ::Sleep(millis); |
| 130 } | 130 } |
| 131 | 131 |
| 132 | 132 |
| 133 void OS::DebugBreak() { | |
| 134 __asm { int 3 } | |
| 135 } | |
| 136 | |
| 137 | |
| 138 void OS::Print(const char* format, ...) { | 133 void OS::Print(const char* format, ...) { |
| 139 va_list args; | 134 va_list args; |
| 140 va_start(args, format); | 135 va_start(args, format); |
| 141 VFPrint(stdout, format, args); | 136 VFPrint(stdout, format, args); |
| 142 va_end(args); | 137 va_end(args); |
| 143 } | 138 } |
| 144 | 139 |
| 145 | 140 |
| 146 void OS::VFPrint(FILE* stream, const char* format, va_list args) { | 141 void OS::VFPrint(FILE* stream, const char* format, va_list args) { |
| 147 vfprintf(stream, format, args); | 142 vfprintf(stream, format, args); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 void OS::Abort() { | 206 void OS::Abort() { |
| 212 abort(); | 207 abort(); |
| 213 } | 208 } |
| 214 | 209 |
| 215 | 210 |
| 216 void OS::Exit(int code) { | 211 void OS::Exit(int code) { |
| 217 exit(code); | 212 exit(code); |
| 218 } | 213 } |
| 219 | 214 |
| 220 } // namespace dart | 215 } // namespace dart |
| OLD | NEW |