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/signal_handler.h" | 9 #include "vm/signal_handler.h" |
10 #include "vm/os_thread.h" | 10 #include "vm/os_thread.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 static const intptr_t kMaxThreads = 4096; | 41 static const intptr_t kMaxThreads = 4096; |
42 static bool initialized_; | 42 static bool initialized_; |
43 static bool shutdown_; | 43 static bool shutdown_; |
44 static bool thread_running_; | 44 static bool thread_running_; |
45 static bool woken_up_; | 45 static bool woken_up_; |
46 static ThreadJoinId interrupter_thread_id_; | 46 static ThreadJoinId interrupter_thread_id_; |
47 static Monitor* monitor_; | 47 static Monitor* monitor_; |
48 static intptr_t interrupt_period_; | 48 static intptr_t interrupt_period_; |
49 static intptr_t current_wait_time_; | 49 static intptr_t current_wait_time_; |
50 | 50 |
| 51 static bool IsDebuggerAttached(); |
| 52 |
51 static bool InDeepSleep() { | 53 static bool InDeepSleep() { |
52 return current_wait_time_ == Monitor::kNoTimeout; | 54 return current_wait_time_ == Monitor::kNoTimeout; |
53 } | 55 } |
54 | 56 |
55 static void ThreadMain(uword parameters); | 57 static void ThreadMain(uword parameters); |
56 | 58 |
57 static void InstallSignalHandler(); | 59 static void InstallSignalHandler(); |
58 | 60 |
59 static void RemoveSignalHandler(); | 61 static void RemoveSignalHandler(); |
60 | 62 |
61 friend class ThreadInterrupterVisitIsolates; | 63 friend class ThreadInterrupterVisitIsolates; |
62 }; | 64 }; |
63 | 65 |
64 } // namespace dart | 66 } // namespace dart |
65 | 67 |
66 #endif // RUNTIME_VM_THREAD_INTERRUPTER_H_ | 68 #endif // RUNTIME_VM_THREAD_INTERRUPTER_H_ |
OLD | NEW |