Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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; | |
|
zra
2016/01/08 23:32:07
Why?
siva
2016/01/12 21:26:22
To access set_thread which is a private method, it
| |
| 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 Loading... | |
| 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_ |
| OLD | NEW |