| 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 TimelineEventBlock* timeline_block_; | 221 TimelineEventBlock* timeline_block_; |
| 222 | 222 |
| 223 // All |Thread|s are registered in the thread list. | 223 // All |Thread|s are registered in the thread list. |
| 224 OSThread* thread_list_next_; | 224 OSThread* thread_list_next_; |
| 225 | 225 |
| 226 uintptr_t thread_interrupt_disabled_; | 226 uintptr_t thread_interrupt_disabled_; |
| 227 Log* log_; | 227 Log* log_; |
| 228 uword stack_base_; | 228 uword stack_base_; |
| 229 Thread* thread_; | 229 Thread* thread_; |
| 230 | 230 |
| 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 |
| 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 |
| 235 // on its deletion in CreateOSThread(). |
| 236 static Mutex* thread_list_lock_; |
| 231 static OSThread* thread_list_head_; | 237 static OSThread* thread_list_head_; |
| 232 static Mutex* thread_list_lock_; | |
| 233 static bool creation_enabled_; | 238 static bool creation_enabled_; |
| 234 | 239 |
| 235 friend class OSThreadIterator; | 240 friend class OSThreadIterator; |
| 236 friend class ThreadInterrupterWin; | 241 friend class ThreadInterrupterWin; |
| 237 friend class ThreadRegistry; | 242 friend class ThreadRegistry; |
| 238 }; | 243 }; |
| 239 | 244 |
| 240 | 245 |
| 241 // 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 |
| 242 // on- or off-line. | 247 // on- or off-line. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 #endif // defined(DEBUG) | 332 #endif // defined(DEBUG) |
| 328 | 333 |
| 329 DISALLOW_COPY_AND_ASSIGN(Monitor); | 334 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 330 }; | 335 }; |
| 331 | 336 |
| 332 | 337 |
| 333 } // namespace dart | 338 } // namespace dart |
| 334 | 339 |
| 335 | 340 |
| 336 #endif // VM_OS_THREAD_H_ | 341 #endif // VM_OS_THREAD_H_ |
| OLD | NEW |