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

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

Issue 2012973002: Background finalization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months 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
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // must currently be called manually (issue 23474). 138 // must currently be called manually (issue 23474).
139 class Thread : public BaseThread { 139 class Thread : public BaseThread {
140 public: 140 public:
141 // The kind of task this thread is performing. Sampled by the profiler. 141 // The kind of task this thread is performing. Sampled by the profiler.
142 enum TaskKind { 142 enum TaskKind {
143 kUnknownTask = 0x0, 143 kUnknownTask = 0x0,
144 kMutatorTask = 0x1, 144 kMutatorTask = 0x1,
145 kCompilerTask = 0x2, 145 kCompilerTask = 0x2,
146 kSweeperTask = 0x4, 146 kSweeperTask = 0x4,
147 kMarkerTask = 0x8, 147 kMarkerTask = 0x8,
148 kFinalizerTask = 0x10,
148 }; 149 };
149 ~Thread(); 150 ~Thread();
150 151
151 // The currently executing thread, or NULL if not yet initialized. 152 // The currently executing thread, or NULL if not yet initialized.
152 static Thread* Current() { 153 static Thread* Current() {
153 BaseThread* thread = OSThread::GetCurrentTLS(); 154 BaseThread* thread = OSThread::GetCurrentTLS();
154 if (thread == NULL || thread->is_os_thread()) { 155 if (thread == NULL || thread->is_os_thread()) {
155 return NULL; 156 return NULL;
156 } 157 }
157 return reinterpret_cast<Thread*>(thread); 158 return reinterpret_cast<Thread*>(thread);
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 // Disable thread interrupts. 766 // Disable thread interrupts.
766 class DisableThreadInterruptsScope : public StackResource { 767 class DisableThreadInterruptsScope : public StackResource {
767 public: 768 public:
768 explicit DisableThreadInterruptsScope(Thread* thread); 769 explicit DisableThreadInterruptsScope(Thread* thread);
769 ~DisableThreadInterruptsScope(); 770 ~DisableThreadInterruptsScope();
770 }; 771 };
771 772
772 } // namespace dart 773 } // namespace dart
773 774
774 #endif // VM_THREAD_H_ 775 #endif // VM_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698