| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "platform/globals.h" | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
| 7 | 7 |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/os.h" | 9 #include "vm/os.h" |
| 10 #include "vm/profiler.h" | 10 #include "vm/profiler.h" |
| 11 #include "vm/thread_interrupter.h" | 11 #include "vm/thread_interrupter.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 #ifndef PRODUCT |
| 16 |
| 15 DECLARE_FLAG(bool, thread_interrupter); | 17 DECLARE_FLAG(bool, thread_interrupter); |
| 16 DECLARE_FLAG(bool, trace_thread_interrupter); | 18 DECLARE_FLAG(bool, trace_thread_interrupter); |
| 17 | 19 |
| 18 #define kThreadError -1 | 20 #define kThreadError -1 |
| 19 | 21 |
| 20 class ThreadInterrupterWin : public AllStatic { | 22 class ThreadInterrupterWin : public AllStatic { |
| 21 public: | 23 public: |
| 22 static bool GrabRegisters(HANDLE handle, InterruptedThreadState* state) { | 24 static bool GrabRegisters(HANDLE handle, InterruptedThreadState* state) { |
| 23 CONTEXT context; | 25 CONTEXT context; |
| 24 memset(&context, 0, sizeof(context)); | 26 memset(&context, 0, sizeof(context)); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 110 |
| 109 void ThreadInterrupter::InstallSignalHandler() { | 111 void ThreadInterrupter::InstallSignalHandler() { |
| 110 // Nothing to do on Windows. | 112 // Nothing to do on Windows. |
| 111 } | 113 } |
| 112 | 114 |
| 113 | 115 |
| 114 void ThreadInterrupter::RemoveSignalHandler() { | 116 void ThreadInterrupter::RemoveSignalHandler() { |
| 115 // Nothing to do on Windows. | 117 // Nothing to do on Windows. |
| 116 } | 118 } |
| 117 | 119 |
| 120 #endif // !PRODUCT |
| 118 | 121 |
| 119 } // namespace dart | 122 } // namespace dart |
| 120 | 123 |
| 121 #endif // defined(TARGET_OS_WINDOWS) | 124 #endif // defined(TARGET_OS_WINDOWS) |
| OLD | NEW |