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 <errno.h> | 7 #include <errno.h> |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <mach/mach.h> | 9 #include <mach/mach.h> |
10 #include <mach/clock.h> | 10 #include <mach/clock.h> |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 (str[i + 1] == 'x' || str[i + 1] == 'X') && | 167 (str[i + 1] == 'x' || str[i + 1] == 'X') && |
168 (str[i + 2] != '\0')) { | 168 (str[i + 2] != '\0')) { |
169 base = 16; | 169 base = 16; |
170 } | 170 } |
171 errno = 0; | 171 errno = 0; |
172 *value = strtoll(str, &endptr, base); | 172 *value = strtoll(str, &endptr, base); |
173 return ((errno == 0) && (endptr != str) && (*endptr == 0)); | 173 return ((errno == 0) && (endptr != str) && (*endptr == 0)); |
174 } | 174 } |
175 | 175 |
176 | 176 |
| 177 void OS::RegisterCodeObservers() { |
| 178 } |
| 179 |
| 180 |
177 void OS::PrintErr(const char* format, ...) { | 181 void OS::PrintErr(const char* format, ...) { |
178 va_list args; | 182 va_list args; |
179 va_start(args, format); | 183 va_start(args, format); |
180 VFPrint(stderr, format, args); | 184 VFPrint(stderr, format, args); |
181 va_end(args); | 185 va_end(args); |
182 } | 186 } |
183 | 187 |
184 | 188 |
185 void OS::InitOnce() { | 189 void OS::InitOnce() { |
186 // TODO(5411554): For now we check that initonce is called only once, | 190 // TODO(5411554): For now we check that initonce is called only once, |
(...skipping 12 matching lines...) Expand all Loading... |
199 void OS::Abort() { | 203 void OS::Abort() { |
200 abort(); | 204 abort(); |
201 } | 205 } |
202 | 206 |
203 | 207 |
204 void OS::Exit(int code) { | 208 void OS::Exit(int code) { |
205 exit(code); | 209 exit(code); |
206 } | 210 } |
207 | 211 |
208 } // namespace dart | 212 } // namespace dart |
OLD | NEW |