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

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

Issue 1541073002: Implement safepointing of threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-typo Created 4 years, 10 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/object_test.cc ('k') | runtime/vm/pages.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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 // thread_list_lock_ cannot have a static lifetime because the order in which 231 // thread_list_lock_ cannot have a static lifetime because the order in which
232 // destructors run is undefined. At the moment this lock cannot be deleted 232 // destructors run is undefined. At the moment this lock cannot be deleted
233 // either since otherwise, if a thread only begins to run after we have 233 // either since otherwise, if a thread only begins to run after we have
234 // started to run TLS destructors for a call to exit(), there will be a race 234 // started to run TLS destructors for a call to exit(), there will be a race
235 // on its deletion in CreateOSThread(). 235 // on its deletion in CreateOSThread().
236 static Mutex* thread_list_lock_; 236 static Mutex* thread_list_lock_;
237 static OSThread* thread_list_head_; 237 static OSThread* thread_list_head_;
238 static bool creation_enabled_; 238 static bool creation_enabled_;
239 239
240 friend class Isolate; // to access set_thread(Thread*).
240 friend class OSThreadIterator; 241 friend class OSThreadIterator;
241 friend class ThreadInterrupterWin; 242 friend class ThreadInterrupterWin;
242 friend class ThreadRegistry;
243 }; 243 };
244 244
245 245
246 // Note that this takes the thread list lock, prohibiting threads from coming 246 // Note that this takes the thread list lock, prohibiting threads from coming
247 // on- or off-line. 247 // on- or off-line.
248 class OSThreadIterator : public ValueObject { 248 class OSThreadIterator : public ValueObject {
249 public: 249 public:
250 OSThreadIterator(); 250 OSThreadIterator();
251 ~OSThreadIterator(); 251 ~OSThreadIterator();
252 252
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 #endif // defined(DEBUG) 332 #endif // defined(DEBUG)
333 333
334 DISALLOW_COPY_AND_ASSIGN(Monitor); 334 DISALLOW_COPY_AND_ASSIGN(Monitor);
335 }; 335 };
336 336
337 337
338 } // namespace dart 338 } // namespace dart
339 339
340 340
341 #endif // VM_OS_THREAD_H_ 341 #endif // VM_OS_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698