OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #include "src/shared/bytecodes.h" | 5 #include "src/shared/bytecodes.h" |
6 #include "src/vm/gc_thread.h" | 6 #include "src/vm/gc_thread.h" |
7 #include "src/vm/program.h" | 7 #include "src/vm/program.h" |
8 #include "src/vm/process.h" | 8 #include "src/vm/process.h" |
9 #include "src/vm/scheduler.h" | 9 #include "src/vm/scheduler.h" |
10 | 10 |
11 namespace fletch { | 11 namespace dartino { |
12 | 12 |
13 void* GCThread::GCThreadEntryPoint(void* data) { | 13 void* GCThread::GCThreadEntryPoint(void* data) { |
14 GCThread* thread = reinterpret_cast<GCThread*>(data); | 14 GCThread* thread = reinterpret_cast<GCThread*>(data); |
15 thread->MainLoop(); | 15 thread->MainLoop(); |
16 return NULL; | 16 return NULL; |
17 } | 17 } |
18 | 18 |
19 GCThread::GCThread() | 19 GCThread::GCThread() |
20 : gc_thread_monitor_(Platform::CreateMonitor()), | 20 : gc_thread_monitor_(Platform::CreateMonitor()), |
21 shutting_down_(false), | 21 shutting_down_(false), |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 program_gc_count_.Clear(); | 214 program_gc_count_.Clear(); |
215 | 215 |
216 // Tell caller of GCThread.Shutdown() we're done. | 216 // Tell caller of GCThread.Shutdown() we're done. |
217 { | 217 { |
218 ScopedMonitorLock lock(client_monitor_); | 218 ScopedMonitorLock lock(client_monitor_); |
219 did_shutdown_ = true; | 219 did_shutdown_ = true; |
220 client_monitor_->NotifyAll(); | 220 client_monitor_->NotifyAll(); |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 } // namespace fletch | 224 } // namespace dartino |
OLD | NEW |