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_ISOLATE_H_ | 5 #ifndef RUNTIME_VM_ISOLATE_H_ |
6 #define RUNTIME_VM_ISOLATE_H_ | 6 #define RUNTIME_VM_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/atomic.h" | 10 #include "vm/atomic.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 Dart_MessageNotifyCallback message_notify_callback() const { | 209 Dart_MessageNotifyCallback message_notify_callback() const { |
210 return message_notify_callback_; | 210 return message_notify_callback_; |
211 } | 211 } |
212 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 212 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
213 message_notify_callback_ = value; | 213 message_notify_callback_ = value; |
214 } | 214 } |
215 | 215 |
216 Thread* mutator_thread() const; | 216 Thread* mutator_thread() const; |
217 | 217 |
| 218 // Mutator thread is not scheduled if NULL or no heap is attached |
| 219 // to it. The latter only occurs when the mutator thread object |
| 220 // is unscheduled by the isolate (or never scheduled). |
| 221 bool IsMutatorThreadScheduled() { |
| 222 return mutator_thread_ != NULL && mutator_thread_->heap() != NULL; |
| 223 } |
| 224 |
218 const char* name() const { return name_; } | 225 const char* name() const { return name_; } |
219 const char* debugger_name() const { return debugger_name_; } | 226 const char* debugger_name() const { return debugger_name_; } |
220 void set_debugger_name(const char* name); | 227 void set_debugger_name(const char* name); |
221 | 228 |
222 int64_t UptimeMicros() const; | 229 int64_t UptimeMicros() const; |
223 | 230 |
224 Dart_Port main_port() const { return main_port_; } | 231 Dart_Port main_port() const { return main_port_; } |
225 void set_main_port(Dart_Port port) { | 232 void set_main_port(Dart_Port port) { |
226 ASSERT(main_port_ == 0); // Only set main port once. | 233 ASSERT(main_port_ == 0); // Only set main port once. |
227 main_port_ = port; | 234 main_port_ = port; |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 intptr_t* spawn_count_; | 1032 intptr_t* spawn_count_; |
1026 | 1033 |
1027 Dart_IsolateFlags isolate_flags_; | 1034 Dart_IsolateFlags isolate_flags_; |
1028 bool paused_; | 1035 bool paused_; |
1029 bool errors_are_fatal_; | 1036 bool errors_are_fatal_; |
1030 }; | 1037 }; |
1031 | 1038 |
1032 } // namespace dart | 1039 } // namespace dart |
1033 | 1040 |
1034 #endif // RUNTIME_VM_ISOLATE_H_ | 1041 #endif // RUNTIME_VM_ISOLATE_H_ |
OLD | NEW |