Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: runtime/vm/os_win.cc

Issue 1722713002: Fix windows build failures (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/vm.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 #include <malloc.h> // NOLINT 10 #include <malloc.h> // NOLINT
11 #include <process.h> // NOLINT 11 #include <process.h> // NOLINT
12 #include <time.h> // NOLINT 12 #include <time.h> // NOLINT
13 13
14 #include "platform/utils.h" 14 #include "platform/utils.h"
15 #include "platform/assert.h" 15 #include "platform/assert.h"
16 #include "vm/os_thread.h" 16 #include "vm/os_thread.h"
17 #include "vm/vtune.h"
18 #include "vm/zone.h" 17 #include "vm/zone.h"
19 18
20 namespace dart { 19 namespace dart {
21 20
22 // Defined in vm/os_thread_win.cc 21 // Defined in vm/os_thread_win.cc
23 extern bool private_flag_windows_run_tls_destructors; 22 extern bool private_flag_windows_run_tls_destructors;
24 23
25 const char* OS::Name() { 24 const char* OS::Name() {
26 return "windows"; 25 return "windows";
27 } 26 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 (str[i + 2] != '\0')) { 357 (str[i + 2] != '\0')) {
359 base = 16; 358 base = 16;
360 } 359 }
361 errno = 0; 360 errno = 0;
362 *value = _strtoi64(str, &endptr, base); 361 *value = _strtoi64(str, &endptr, base);
363 return ((errno == 0) && (endptr != str) && (*endptr == 0)); 362 return ((errno == 0) && (endptr != str) && (*endptr == 0));
364 } 363 }
365 364
366 365
367 void OS::RegisterCodeObservers() { 366 void OS::RegisterCodeObservers() {
368 #if defined(DART_VTUNE_SUPPORT)
369 CodeObservers::Register(new VTuneCodeObserver);
370 #endif
371 } 367 }
372 368
373 369
374 void OS::PrintErr(const char* format, ...) { 370 void OS::PrintErr(const char* format, ...) {
375 va_list args; 371 va_list args;
376 va_start(args, format); 372 va_start(args, format);
377 VFPrint(stderr, format, args); 373 VFPrint(stderr, format, args);
378 va_end(args); 374 va_end(args);
379 } 375 }
380 376
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // TODO(zra): Remove once VM shuts down cleanly. 413 // TODO(zra): Remove once VM shuts down cleanly.
418 private_flag_windows_run_tls_destructors = false; 414 private_flag_windows_run_tls_destructors = false;
419 // On Windows we use ExitProcess so that threads can't clobber the exit_code. 415 // On Windows we use ExitProcess so that threads can't clobber the exit_code.
420 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870 416 // See: https://code.google.com/p/nativeclient/issues/detail?id=2870
421 ::ExitProcess(code); 417 ::ExitProcess(code);
422 } 418 }
423 419
424 } // namespace dart 420 } // namespace dart
425 421
426 #endif // defined(TARGET_OS_WINDOWS) 422 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/vm.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698