| 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 RUNTIME_VM_OS_THREAD_H_ | 5 #ifndef RUNTIME_VM_OS_THREAD_H_ |
| 6 #define RUNTIME_VM_OS_THREAD_H_ | 6 #define RUNTIME_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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // either since otherwise, if a thread only begins to run after we have | 245 // either since otherwise, if a thread only begins to run after we have |
| 246 // started to run TLS destructors for a call to exit(), there will be a race | 246 // started to run TLS destructors for a call to exit(), there will be a race |
| 247 // on its deletion in CreateOSThread(). | 247 // on its deletion in CreateOSThread(). |
| 248 static Mutex* thread_list_lock_; | 248 static Mutex* thread_list_lock_; |
| 249 static OSThread* thread_list_head_; | 249 static OSThread* thread_list_head_; |
| 250 static bool creation_enabled_; | 250 static bool creation_enabled_; |
| 251 | 251 |
| 252 friend class Isolate; // to access set_thread(Thread*). | 252 friend class Isolate; // to access set_thread(Thread*). |
| 253 friend class OSThreadIterator; | 253 friend class OSThreadIterator; |
| 254 friend class ThreadInterrupterWin; | 254 friend class ThreadInterrupterWin; |
| 255 friend class ThreadInterrupterFuchsia; |
| 255 }; | 256 }; |
| 256 | 257 |
| 257 | 258 |
| 258 // Note that this takes the thread list lock, prohibiting threads from coming | 259 // Note that this takes the thread list lock, prohibiting threads from coming |
| 259 // on- or off-line. | 260 // on- or off-line. |
| 260 class OSThreadIterator : public ValueObject { | 261 class OSThreadIterator : public ValueObject { |
| 261 public: | 262 public: |
| 262 OSThreadIterator(); | 263 OSThreadIterator(); |
| 263 ~OSThreadIterator(); | 264 ~OSThreadIterator(); |
| 264 | 265 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 friend class SafepointMonitorLocker; | 354 friend class SafepointMonitorLocker; |
| 354 friend void Dart_TestMonitor(); | 355 friend void Dart_TestMonitor(); |
| 355 DISALLOW_COPY_AND_ASSIGN(Monitor); | 356 DISALLOW_COPY_AND_ASSIGN(Monitor); |
| 356 }; | 357 }; |
| 357 | 358 |
| 358 | 359 |
| 359 } // namespace dart | 360 } // namespace dart |
| 360 | 361 |
| 361 | 362 |
| 362 #endif // RUNTIME_VM_OS_THREAD_H_ | 363 #endif // RUNTIME_VM_OS_THREAD_H_ |
| OLD | NEW |