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

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

Issue 1482243006: VM: Small clean up and const-ness fix for Thread/OSThread constants. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/dart_api_impl.cc ('k') | runtime/vm/os_thread.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_OS_THREAD_H_ 5 #ifndef VM_OS_THREAD_H_
6 #define VM_OS_THREAD_H_ 6 #define VM_OS_THREAD_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 static bool Compare(ThreadId a, ThreadId b); 168 static bool Compare(ThreadId a, ThreadId b);
169 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage); 169 static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage);
170 170
171 // Called at VM startup and shutdown. 171 // Called at VM startup and shutdown.
172 static void InitOnce(); 172 static void InitOnce();
173 173
174 static bool IsThreadInList(ThreadId join_id); 174 static bool IsThreadInList(ThreadId join_id);
175 175
176 static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize); 176 static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize);
177 177
178 static ThreadLocalKey kUnsetThreadLocalKey; 178 static const ThreadId kInvalidThreadId;
179 static ThreadId kInvalidThreadId; 179 static const ThreadJoinId kInvalidThreadJoinId;
180 static ThreadJoinId kInvalidThreadJoinId;
181 180
182 private: 181 private:
183 // These methods should not be used in a generic way and hence 182 // These methods should not be used in a generic way and hence
184 // are private, they have been added to solve the problem of 183 // are private, they have been added to solve the problem of
185 // accessing the VM thread structure from an OSThread object 184 // accessing the VM thread structure from an OSThread object
186 // in the windows thread interrupter which is used for profiling. 185 // in the windows thread interrupter which is used for profiling.
187 // We could eliminate this requirement if the windows thread interrupter 186 // We could eliminate this requirement if the windows thread interrupter
188 // is implemented differently. 187 // is implemented differently.
189 Thread* thread() const { return thread_; } 188 Thread* thread() const { return thread_; }
190 void set_thread(Thread* value) { 189 void set_thread(Thread* value) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 #endif // defined(DEBUG) 313 #endif // defined(DEBUG)
315 314
316 DISALLOW_COPY_AND_ASSIGN(Monitor); 315 DISALLOW_COPY_AND_ASSIGN(Monitor);
317 }; 316 };
318 317
319 318
320 } // namespace dart 319 } // namespace dart
321 320
322 321
323 #endif // VM_OS_THREAD_H_ 322 #endif // VM_OS_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/os_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698