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 #ifndef RUNTIME_VM_THREAD_INTERRUPTER_H_ | 5 #ifndef RUNTIME_VM_THREAD_INTERRUPTER_H_ |
6 #define RUNTIME_VM_THREAD_INTERRUPTER_H_ | 6 #define RUNTIME_VM_THREAD_INTERRUPTER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/os_thread.h" |
9 #include "vm/signal_handler.h" | 10 #include "vm/signal_handler.h" |
10 #include "vm/os_thread.h" | |
11 #include "vm/thread.h" | 11 #include "vm/thread.h" |
12 | 12 |
13 namespace dart { | 13 namespace dart { |
14 | 14 |
15 struct InterruptedThreadState { | 15 struct InterruptedThreadState { |
16 uintptr_t pc; | 16 uintptr_t pc; |
17 uintptr_t csp; | 17 uintptr_t csp; |
18 uintptr_t dsp; | 18 uintptr_t dsp; |
19 uintptr_t fp; | 19 uintptr_t fp; |
20 uintptr_t lr; | 20 uintptr_t lr; |
21 }; | 21 }; |
22 | 22 |
23 | |
24 class ThreadInterrupter : public AllStatic { | 23 class ThreadInterrupter : public AllStatic { |
25 public: | 24 public: |
26 static void InitOnce(); | 25 static void InitOnce(); |
27 | 26 |
28 static void Startup(); | 27 static void Startup(); |
29 static void Shutdown(); | 28 static void Shutdown(); |
30 | 29 |
31 // Delay between interrupts. | 30 // Delay between interrupts. |
32 static void SetInterruptPeriod(intptr_t period); | 31 static void SetInterruptPeriod(intptr_t period); |
33 | 32 |
(...skipping 25 matching lines...) Expand all Loading... |
59 static void InstallSignalHandler(); | 58 static void InstallSignalHandler(); |
60 | 59 |
61 static void RemoveSignalHandler(); | 60 static void RemoveSignalHandler(); |
62 | 61 |
63 friend class ThreadInterrupterVisitIsolates; | 62 friend class ThreadInterrupterVisitIsolates; |
64 }; | 63 }; |
65 | 64 |
66 } // namespace dart | 65 } // namespace dart |
67 | 66 |
68 #endif // RUNTIME_VM_THREAD_INTERRUPTER_H_ | 67 #endif // RUNTIME_VM_THREAD_INTERRUPTER_H_ |
OLD | NEW |