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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 570 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
571 #undef REUSABLE_HANDLE_FIELDS | 571 #undef REUSABLE_HANDLE_FIELDS |
572 | 572 |
573 #if defined(DEBUG) | 573 #if defined(DEBUG) |
574 #define REUSABLE_HANDLE_SCOPE_VARIABLE(object) \ | 574 #define REUSABLE_HANDLE_SCOPE_VARIABLE(object) \ |
575 bool reusable_##object##_handle_scope_active_; | 575 bool reusable_##object##_handle_scope_active_; |
576 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE); | 576 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE); |
577 #undef REUSABLE_HANDLE_SCOPE_VARIABLE | 577 #undef REUSABLE_HANDLE_SCOPE_VARIABLE |
578 #endif // defined(DEBUG) | 578 #endif // defined(DEBUG) |
579 | 579 |
580 class AtSafepointField : public BitField<bool, 0, 1> {}; | 580 class AtSafepointField : public BitField<uint32_t, bool, 0, 1> {}; |
581 class SafepointRequestedField : public BitField<bool, 1, 1> {}; | 581 class SafepointRequestedField : public BitField<uint32_t, bool, 1, 1> {}; |
582 class BlockedForSafepointField : public BitField<bool, 2, 1> {}; | 582 class BlockedForSafepointField : public BitField<uint32_t, bool, 2, 1> {}; |
583 uint32_t safepoint_state_; | 583 uint32_t safepoint_state_; |
584 uint32_t execution_state_; | 584 uint32_t execution_state_; |
585 | 585 |
586 Thread* next_; // Used to chain the thread structures in an isolate. | 586 Thread* next_; // Used to chain the thread structures in an isolate. |
587 | 587 |
588 explicit Thread(Isolate* isolate); | 588 explicit Thread(Isolate* isolate); |
589 | 589 |
590 void StoreBufferRelease( | 590 void StoreBufferRelease( |
591 StoreBuffer::ThresholdPolicy policy = StoreBuffer::kCheckThreshold); | 591 StoreBuffer::ThresholdPolicy policy = StoreBuffer::kCheckThreshold); |
592 void StoreBufferAcquire(); | 592 void StoreBufferAcquire(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 // Disable thread interrupts. | 634 // Disable thread interrupts. |
635 class DisableThreadInterruptsScope : public StackResource { | 635 class DisableThreadInterruptsScope : public StackResource { |
636 public: | 636 public: |
637 explicit DisableThreadInterruptsScope(Thread* thread); | 637 explicit DisableThreadInterruptsScope(Thread* thread); |
638 ~DisableThreadInterruptsScope(); | 638 ~DisableThreadInterruptsScope(); |
639 }; | 639 }; |
640 | 640 |
641 } // namespace dart | 641 } // namespace dart |
642 | 642 |
643 #endif // VM_THREAD_H_ | 643 #endif // VM_THREAD_H_ |
OLD | NEW |