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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 Dart_MessageNotifyCallback message_notify_callback() const { | 214 Dart_MessageNotifyCallback message_notify_callback() const { |
215 return message_notify_callback_; | 215 return message_notify_callback_; |
216 } | 216 } |
217 void set_message_notify_callback(Dart_MessageNotifyCallback value) { | 217 void set_message_notify_callback(Dart_MessageNotifyCallback value) { |
218 message_notify_callback_ = value; | 218 message_notify_callback_ = value; |
219 } | 219 } |
220 | 220 |
221 Thread* mutator_thread() const; | 221 Thread* mutator_thread() const; |
222 | 222 |
| 223 // Mutator thread is not scheduled if NULL or no heap is attached |
| 224 // to it. The latter only occurs when the mutator thread object |
| 225 // is unscheduled by the isolate (or never scheduled). |
| 226 bool IsMutatorThreadScheduled() { |
| 227 return mutator_thread_ != NULL && mutator_thread_->heap() != NULL; |
| 228 } |
| 229 |
223 const char* name() const { return name_; } | 230 const char* name() const { return name_; } |
224 const char* debugger_name() const { return debugger_name_; } | 231 const char* debugger_name() const { return debugger_name_; } |
225 void set_debugger_name(const char* name); | 232 void set_debugger_name(const char* name); |
226 | 233 |
227 int64_t UptimeMicros() const; | 234 int64_t UptimeMicros() const; |
228 | 235 |
229 Dart_Port main_port() const { return main_port_; } | 236 Dart_Port main_port() const { return main_port_; } |
230 void set_main_port(Dart_Port port) { | 237 void set_main_port(Dart_Port port) { |
231 ASSERT(main_port_ == 0); // Only set main port once. | 238 ASSERT(main_port_ == 0); // Only set main port once. |
232 main_port_ = port; | 239 main_port_ = port; |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 intptr_t* spawn_count_; | 1041 intptr_t* spawn_count_; |
1035 | 1042 |
1036 Dart_IsolateFlags isolate_flags_; | 1043 Dart_IsolateFlags isolate_flags_; |
1037 bool paused_; | 1044 bool paused_; |
1038 bool errors_are_fatal_; | 1045 bool errors_are_fatal_; |
1039 }; | 1046 }; |
1040 | 1047 |
1041 } // namespace dart | 1048 } // namespace dart |
1042 | 1049 |
1043 #endif // RUNTIME_VM_ISOLATE_H_ | 1050 #endif // RUNTIME_VM_ISOLATE_H_ |
OLD | NEW |