| 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/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 // TODO(iposva): Move this out to bin/thread initialization. | |
| 15 #include "bin/thread.h" | |
| 16 | |
| 17 #include "platform/utils.h" | 14 #include "platform/utils.h" |
| 18 #include "platform/assert.h" | 15 #include "platform/assert.h" |
| 19 #include "vm/thread.h" | 16 #include "vm/thread.h" |
| 20 #include "vm/vtune.h" | 17 #include "vm/vtune.h" |
| 21 | 18 |
| 22 namespace dart { | 19 namespace dart { |
| 23 | 20 |
| 24 const char* OS::Name() { | 21 const char* OS::Name() { |
| 25 return "windows"; | 22 return "windows"; |
| 26 } | 23 } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 // TODO(5411554): For now we check that initonce is called only once, | 308 // TODO(5411554): For now we check that initonce is called only once, |
| 312 // Once there is more formal mechanism to call InitOnce we can move | 309 // Once there is more formal mechanism to call InitOnce we can move |
| 313 // this check there. | 310 // this check there. |
| 314 static bool init_once_called = false; | 311 static bool init_once_called = false; |
| 315 ASSERT(init_once_called == false); | 312 ASSERT(init_once_called == false); |
| 316 init_once_called = true; | 313 init_once_called = true; |
| 317 // Do not pop up a message box when abort is called. | 314 // Do not pop up a message box when abort is called. |
| 318 _set_abort_behavior(0, _WRITE_ABORT_MSG); | 315 _set_abort_behavior(0, _WRITE_ABORT_MSG); |
| 319 MonitorWaitData::monitor_wait_data_key_ = Thread::CreateThreadLocal(); | 316 MonitorWaitData::monitor_wait_data_key_ = Thread::CreateThreadLocal(); |
| 320 MonitorData::GetMonitorWaitDataForThread(); | 317 MonitorData::GetMonitorWaitDataForThread(); |
| 321 // TODO(iposva): Move this out to bin/thread initialization. | |
| 322 bin::MonitorWaitData::monitor_wait_data_key_ = Thread::CreateThreadLocal(); | |
| 323 bin::MonitorData::GetMonitorWaitDataForThread(); | |
| 324 } | 318 } |
| 325 | 319 |
| 326 | 320 |
| 327 void OS::Shutdown() { | 321 void OS::Shutdown() { |
| 328 } | 322 } |
| 329 | 323 |
| 330 | 324 |
| 331 void OS::Abort() { | 325 void OS::Abort() { |
| 332 abort(); | 326 abort(); |
| 333 } | 327 } |
| 334 | 328 |
| 335 | 329 |
| 336 void OS::Exit(int code) { | 330 void OS::Exit(int code) { |
| 337 exit(code); | 331 exit(code); |
| 338 } | 332 } |
| 339 | 333 |
| 340 } // namespace dart | 334 } // namespace dart |
| 341 | 335 |
| 342 #endif // defined(TARGET_OS_WINDOWS) | 336 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |