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_WIN_H_ | 5 #ifndef VM_OS_THREAD_WIN_H_ |
6 #define VM_OS_THREAD_WIN_H_ | 6 #define VM_OS_THREAD_WIN_H_ |
7 | 7 |
8 #if !defined(VM_OS_THREAD_H_) | 8 #if !defined(VM_OS_THREAD_H_) |
9 #error Do not include os_thread_win.h directly; use os_thread.h instead. | 9 #error Do not include os_thread_win.h directly; use os_thread.h instead. |
10 #endif | 10 #endif |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 DISALLOW_ALLOCATION(); | 145 DISALLOW_ALLOCATION(); |
146 }; | 146 }; |
147 | 147 |
148 | 148 |
149 template<typename T> | 149 template<typename T> |
150 class MallocGrowableArray; | 150 class MallocGrowableArray; |
151 | 151 |
152 | 152 |
153 class ThreadLocalData : public AllStatic { | 153 class ThreadLocalData : public AllStatic { |
| 154 public: |
| 155 static void RunDestructors(); |
| 156 |
154 private: | 157 private: |
155 static void AddThreadLocal(ThreadLocalKey key, ThreadDestructor destructor); | 158 static void AddThreadLocal(ThreadLocalKey key, ThreadDestructor destructor); |
156 static void RemoveThreadLocal(ThreadLocalKey key); | 159 static void RemoveThreadLocal(ThreadLocalKey key); |
157 | 160 |
158 static void RunDestructors(); | |
159 | |
160 static Mutex* mutex_; | 161 static Mutex* mutex_; |
161 static MallocGrowableArray<ThreadLocalEntry>* thread_locals_; | 162 static MallocGrowableArray<ThreadLocalEntry>* thread_locals_; |
162 | 163 |
163 static void InitOnce(); | 164 static void InitOnce(); |
164 static void Shutdown(); | 165 static void Shutdown(); |
165 | 166 |
166 friend class OS; | 167 friend class OS; |
167 friend class OSThread; | 168 friend class OSThread; |
168 }; | 169 }; |
169 | 170 |
170 } // namespace dart | 171 } // namespace dart |
171 | 172 |
172 #endif // VM_OS_THREAD_WIN_H_ | 173 #endif // VM_OS_THREAD_WIN_H_ |
OLD | NEW |