Index: src/sweeper-thread.cc |
diff --git a/src/sweeper-thread.cc b/src/sweeper-thread.cc |
index ede567a48574ede71132dcd405727dbfe2819452..58c684a54f62c40f0f1aa51f761b99c0f64189dc 100644 |
--- a/src/sweeper-thread.cc |
+++ b/src/sweeper-thread.cc |
@@ -42,9 +42,9 @@ SweeperThread::SweeperThread(Isolate* isolate) |
isolate_(isolate), |
heap_(isolate->heap()), |
collector_(heap_->mark_compact_collector()), |
- start_sweeping_semaphore_(OS::CreateSemaphore(0)), |
- end_sweeping_semaphore_(OS::CreateSemaphore(0)), |
- stop_semaphore_(OS::CreateSemaphore(0)), |
+ start_sweeping_semaphore_(0), |
+ end_sweeping_semaphore_(0), |
+ stop_semaphore_(0), |
free_list_old_data_space_(heap_->paged_space(OLD_DATA_SPACE)), |
free_list_old_pointer_space_(heap_->paged_space(OLD_POINTER_SPACE)), |
private_free_list_old_data_space_(heap_->paged_space(OLD_DATA_SPACE)), |
@@ -61,10 +61,10 @@ void SweeperThread::Run() { |
DisallowHandleDereference no_deref; |
while (true) { |
- start_sweeping_semaphore_->Wait(); |
+ start_sweeping_semaphore_.Wait(); |
if (Acquire_Load(&stop_thread_)) { |
- stop_semaphore_->Signal(); |
+ stop_semaphore_.Signal(); |
return; |
} |
@@ -74,7 +74,7 @@ void SweeperThread::Run() { |
collector_->SweepInParallel(heap_->old_pointer_space(), |
&private_free_list_old_pointer_space_, |
&free_list_old_pointer_space_); |
- end_sweeping_semaphore_->Signal(); |
+ end_sweeping_semaphore_.Signal(); |
} |
} |
@@ -91,18 +91,18 @@ intptr_t SweeperThread::StealMemory(PagedSpace* space) { |
void SweeperThread::Stop() { |
Release_Store(&stop_thread_, static_cast<AtomicWord>(true)); |
- start_sweeping_semaphore_->Signal(); |
- stop_semaphore_->Wait(); |
+ start_sweeping_semaphore_.Signal(); |
+ stop_semaphore_.Wait(); |
Join(); |
} |
void SweeperThread::StartSweeping() { |
- start_sweeping_semaphore_->Signal(); |
+ start_sweeping_semaphore_.Signal(); |
} |
void SweeperThread::WaitForSweeperThread() { |
- end_sweeping_semaphore_->Wait(); |
+ end_sweeping_semaphore_.Wait(); |
} |
} } // namespace v8::internal |