OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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_THREAD_H_ | 5 #ifndef VM_THREAD_H_ |
6 #define VM_THREAD_H_ | 6 #define VM_THREAD_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #include "vm/os_thread.h" | 9 #include "vm/os_thread.h" |
10 #include "vm/store_buffer.h" | 10 #include "vm/store_buffer.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 #undef DECLARE_MEMBERS | 239 #undef DECLARE_MEMBERS |
240 | 240 |
241 explicit Thread(bool init_vm_constants = true); | 241 explicit Thread(bool init_vm_constants = true); |
242 | 242 |
243 void InitVMConstants(); | 243 void InitVMConstants(); |
244 | 244 |
245 void ClearState() { | 245 void ClearState() { |
246 memset(&state_, 0, sizeof(state_)); | 246 memset(&state_, 0, sizeof(state_)); |
247 } | 247 } |
248 | 248 |
| 249 void StoreBufferRelease(bool check_threshold = true); |
| 250 void StoreBufferAcquire(); |
| 251 |
249 void set_zone(Zone* zone) { | 252 void set_zone(Zone* zone) { |
250 state_.zone = zone; | 253 state_.zone = zone; |
251 } | 254 } |
252 | 255 |
253 void set_top_exit_frame_info(uword top_exit_frame_info) { | 256 void set_top_exit_frame_info(uword top_exit_frame_info) { |
254 state_.top_exit_frame_info = top_exit_frame_info; | 257 state_.top_exit_frame_info = top_exit_frame_info; |
255 } | 258 } |
256 | 259 |
257 static void SetCurrent(Thread* current); | 260 static void SetCurrent(Thread* current); |
258 | 261 |
259 void Schedule(Isolate* isolate); | 262 void Schedule(Isolate* isolate); |
260 void Unschedule(); | 263 void Unschedule(); |
261 | 264 |
262 friend class ApiZone; | 265 friend class ApiZone; |
263 friend class Isolate; | 266 friend class Isolate; |
264 friend class StackZone; | 267 friend class StackZone; |
265 friend class ThreadRegistry; | 268 friend class ThreadRegistry; |
266 DISALLOW_COPY_AND_ASSIGN(Thread); | 269 DISALLOW_COPY_AND_ASSIGN(Thread); |
267 }; | 270 }; |
268 | 271 |
269 } // namespace dart | 272 } // namespace dart |
270 | 273 |
271 #endif // VM_THREAD_H_ | 274 #endif // VM_THREAD_H_ |
OLD | NEW |