| 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 StoreBufferFlush(bool check_threshold = true); |
| 250 |
| 249 void set_zone(Zone* zone) { | 251 void set_zone(Zone* zone) { |
| 250 state_.zone = zone; | 252 state_.zone = zone; |
| 251 } | 253 } |
| 252 | 254 |
| 253 void set_top_exit_frame_info(uword top_exit_frame_info) { | 255 void set_top_exit_frame_info(uword top_exit_frame_info) { |
| 254 state_.top_exit_frame_info = top_exit_frame_info; | 256 state_.top_exit_frame_info = top_exit_frame_info; |
| 255 } | 257 } |
| 256 | 258 |
| 257 static void SetCurrent(Thread* current); | 259 static void SetCurrent(Thread* current); |
| 258 | 260 |
| 259 void Schedule(Isolate* isolate); | 261 void Schedule(Isolate* isolate); |
| 260 void Unschedule(); | 262 void Unschedule(); |
| 261 | 263 |
| 262 friend class ApiZone; | 264 friend class ApiZone; |
| 263 friend class Isolate; | 265 friend class Isolate; |
| 264 friend class StackZone; | 266 friend class StackZone; |
| 265 friend class ThreadRegistry; | 267 friend class ThreadRegistry; |
| 266 DISALLOW_COPY_AND_ASSIGN(Thread); | 268 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 267 }; | 269 }; |
| 268 | 270 |
| 269 } // namespace dart | 271 } // namespace dart |
| 270 | 272 |
| 271 #endif // VM_THREAD_H_ | 273 #endif // VM_THREAD_H_ |
| OLD | NEW |