Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: src/optimizing-compiler-thread.cc

Issue 23748003: Cleanup Semaphore class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Build fix for Mac OS X. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/optimizing-compiler-thread.h ('k') | src/platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/optimizing-compiler-thread.cc
diff --git a/src/optimizing-compiler-thread.cc b/src/optimizing-compiler-thread.cc
index 1f77d5ae05438ecbea55d04c6e6bf9a1e06e5fa4..96847dcc84d76ad75949a136c4125dcf0e8bc7da 100644
--- a/src/optimizing-compiler-thread.cc
+++ b/src/optimizing-compiler-thread.cc
@@ -52,7 +52,7 @@ void OptimizingCompilerThread::Run() {
if (FLAG_trace_concurrent_recompilation) total_timer.Start();
while (true) {
- input_queue_semaphore_->Wait();
+ input_queue_semaphore_.Wait();
Logger::TimerEventScope timer(
isolate_, Logger::TimerEventScope::v8_recompile_concurrent);
@@ -67,7 +67,7 @@ void OptimizingCompilerThread::Run() {
if (FLAG_trace_concurrent_recompilation) {
time_spent_total_ = total_timer.Elapsed();
}
- stop_semaphore_->Signal();
+ stop_semaphore_.Signal();
return;
case FLUSH:
// The main thread is blocked, waiting for the stop semaphore.
@@ -76,7 +76,7 @@ void OptimizingCompilerThread::Run() {
}
Release_Store(&queue_length_, static_cast<AtomicWord>(0));
Release_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
- stop_semaphore_->Signal();
+ stop_semaphore_.Signal();
// Return to start of consumer loop.
continue;
}
@@ -123,7 +123,7 @@ void OptimizingCompilerThread::FlushInputQueue(bool restore_function_code) {
while (input_queue_.Dequeue(&optimizing_compiler)) {
// This should not block, since we have one signal on the input queue
// semaphore corresponding to each element in the input queue.
- input_queue_semaphore_->Wait();
+ input_queue_semaphore_.Wait();
CompilationInfo* info = optimizing_compiler->info();
if (restore_function_code) {
Handle<JSFunction> function = info->closure();
@@ -151,8 +151,8 @@ void OptimizingCompilerThread::FlushOutputQueue(bool restore_function_code) {
void OptimizingCompilerThread::Flush() {
ASSERT(!IsOptimizerThread());
Release_Store(&stop_thread_, static_cast<AtomicWord>(FLUSH));
- input_queue_semaphore_->Signal();
- stop_semaphore_->Wait();
+ input_queue_semaphore_.Signal();
+ stop_semaphore_.Wait();
FlushOutputQueue(true);
}
@@ -160,8 +160,8 @@ void OptimizingCompilerThread::Flush() {
void OptimizingCompilerThread::Stop() {
ASSERT(!IsOptimizerThread());
Release_Store(&stop_thread_, static_cast<AtomicWord>(STOP));
- input_queue_semaphore_->Signal();
- stop_semaphore_->Wait();
+ input_queue_semaphore_.Signal();
+ stop_semaphore_.Wait();
if (FLAG_concurrent_recompilation_delay != 0) {
// Barrier when loading queue length is not necessary since the write
@@ -204,7 +204,7 @@ void OptimizingCompilerThread::QueueForOptimization(
Barrier_AtomicIncrement(&queue_length_, static_cast<Atomic32>(1));
optimizing_compiler->info()->closure()->MarkInRecompileQueue();
input_queue_.Enqueue(optimizing_compiler);
- input_queue_semaphore_->Signal();
+ input_queue_semaphore_.Signal();
}
« no previous file with comments | « src/optimizing-compiler-thread.h ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698