OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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_THREAD_H_ | 5 #ifndef VM_THREAD_H_ |
6 #define VM_THREAD_H_ | 6 #define VM_THREAD_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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 void set_os_thread(OSThread* os_thread) { | 252 void set_os_thread(OSThread* os_thread) { |
253 os_thread_ = os_thread; | 253 os_thread_ = os_thread; |
254 } | 254 } |
255 | 255 |
256 // Monitor corresponding to this thread. | 256 // Monitor corresponding to this thread. |
257 Monitor* thread_lock() const { return thread_lock_; } | 257 Monitor* thread_lock() const { return thread_lock_; } |
258 | 258 |
259 // The topmost zone used for allocation in this thread. | 259 // The topmost zone used for allocation in this thread. |
260 Zone* zone() const { return zone_; } | 260 Zone* zone() const { return zone_; } |
261 | 261 |
| 262 bool ZoneIsOwnedByThread(Zone* zone) const; |
| 263 |
262 // The reusable api local scope for this thread. | 264 // The reusable api local scope for this thread. |
263 ApiLocalScope* api_reusable_scope() const { return api_reusable_scope_; } | 265 ApiLocalScope* api_reusable_scope() const { return api_reusable_scope_; } |
264 void set_api_reusable_scope(ApiLocalScope* value) { | 266 void set_api_reusable_scope(ApiLocalScope* value) { |
265 ASSERT(value == NULL || api_reusable_scope_ == NULL); | 267 ASSERT(value == NULL || api_reusable_scope_ == NULL); |
266 api_reusable_scope_ = value; | 268 api_reusable_scope_ = value; |
267 } | 269 } |
268 | 270 |
269 // The api local scope for this thread, this where all local handles | 271 // The api local scope for this thread, this where all local handles |
270 // are allocated. | 272 // are allocated. |
271 ApiLocalScope* api_top_scope() const { return api_top_scope_; } | 273 ApiLocalScope* api_top_scope() const { return api_top_scope_; } |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // Disable thread interrupts. | 780 // Disable thread interrupts. |
779 class DisableThreadInterruptsScope : public StackResource { | 781 class DisableThreadInterruptsScope : public StackResource { |
780 public: | 782 public: |
781 explicit DisableThreadInterruptsScope(Thread* thread); | 783 explicit DisableThreadInterruptsScope(Thread* thread); |
782 ~DisableThreadInterruptsScope(); | 784 ~DisableThreadInterruptsScope(); |
783 }; | 785 }; |
784 | 786 |
785 } // namespace dart | 787 } // namespace dart |
786 | 788 |
787 #endif // VM_THREAD_H_ | 789 #endif // VM_THREAD_H_ |
OLD | NEW |