Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Side by Side Diff: runtime/vm/isolate.h

Issue 1408923005: Add IsMutatorThread to the Thread class and use it instead of MutatorThreadIsCurrentThread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 VM_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 void set_message_notify_callback(Dart_MessageNotifyCallback value) { 144 void set_message_notify_callback(Dart_MessageNotifyCallback value) {
145 message_notify_callback_ = value; 145 message_notify_callback_ = value;
146 } 146 }
147 147
148 // Limited public access to BaseIsolate::mutator_thread_ for code that 148 // Limited public access to BaseIsolate::mutator_thread_ for code that
149 // must treat the mutator as the default or a special case. Prefer code 149 // must treat the mutator as the default or a special case. Prefer code
150 // that works uniformly across all threads. 150 // that works uniformly across all threads.
151 bool HasMutatorThread() { 151 bool HasMutatorThread() {
152 return mutator_thread_ != NULL; 152 return mutator_thread_ != NULL;
153 } 153 }
154 bool MutatorThreadIsCurrentThread() { 154 Thread* mutator_thread() const {
155 return mutator_thread_ == Thread::Current(); 155 return mutator_thread_;
156 } 156 }
157 157
158 const char* name() const { return name_; } 158 const char* name() const { return name_; }
159 const char* debugger_name() const { return debugger_name_; } 159 const char* debugger_name() const { return debugger_name_; }
160 void set_debugger_name(const char* name); 160 void set_debugger_name(const char* name);
161 161
162 int64_t start_time() const { return start_time_; } 162 int64_t start_time() const { return start_time_; }
163 163
164 Dart_Port main_port() const { return main_port_; } 164 Dart_Port main_port() const { return main_port_; }
165 void set_main_port(Dart_Port port) { 165 void set_main_port(Dart_Port port) {
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 uint8_t* serialized_message_; 1025 uint8_t* serialized_message_;
1026 intptr_t serialized_message_len_; 1026 intptr_t serialized_message_len_;
1027 Isolate::Flags isolate_flags_; 1027 Isolate::Flags isolate_flags_;
1028 bool paused_; 1028 bool paused_;
1029 bool errors_are_fatal_; 1029 bool errors_are_fatal_;
1030 }; 1030 };
1031 1031
1032 } // namespace dart 1032 } // namespace dart
1033 1033
1034 #endif // VM_ISOLATE_H_ 1034 #endif // VM_ISOLATE_H_
OLDNEW
« runtime/vm/debugger.h ('K') | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698