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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 #undef DECLARE_MEMBERS | 246 #undef DECLARE_MEMBERS |
247 | 247 |
248 explicit Thread(bool init_vm_constants = true); | 248 explicit Thread(bool init_vm_constants = true); |
249 | 249 |
250 void InitVMConstants(); | 250 void InitVMConstants(); |
251 | 251 |
252 void ClearState() { | 252 void ClearState() { |
253 memset(&state_, 0, sizeof(state_)); | 253 memset(&state_, 0, sizeof(state_)); |
254 } | 254 } |
255 | 255 |
| 256 void StoreBufferRelease(bool check_threshold = true); |
| 257 void StoreBufferAcquire(); |
| 258 |
256 void set_zone(Zone* zone) { | 259 void set_zone(Zone* zone) { |
257 state_.zone = zone; | 260 state_.zone = zone; |
258 } | 261 } |
259 | 262 |
260 void set_top_exit_frame_info(uword top_exit_frame_info) { | 263 void set_top_exit_frame_info(uword top_exit_frame_info) { |
261 state_.top_exit_frame_info = top_exit_frame_info; | 264 state_.top_exit_frame_info = top_exit_frame_info; |
262 } | 265 } |
263 | 266 |
264 static void SetCurrent(Thread* current); | 267 static void SetCurrent(Thread* current); |
265 | 268 |
266 void Schedule(Isolate* isolate); | 269 void Schedule(Isolate* isolate); |
267 void Unschedule(); | 270 void Unschedule(); |
268 | 271 |
269 friend class ApiZone; | 272 friend class ApiZone; |
270 friend class Isolate; | 273 friend class Isolate; |
271 friend class StackZone; | 274 friend class StackZone; |
272 friend class ThreadRegistry; | 275 friend class ThreadRegistry; |
273 DISALLOW_COPY_AND_ASSIGN(Thread); | 276 DISALLOW_COPY_AND_ASSIGN(Thread); |
274 }; | 277 }; |
275 | 278 |
276 } // namespace dart | 279 } // namespace dart |
277 | 280 |
278 #endif // VM_THREAD_H_ | 281 #endif // VM_THREAD_H_ |
OLD | NEW |