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

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

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/marking-thread.cc ('k') | src/optimizing-compiler-thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/optimizing-compiler-thread.h
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
index 10ed420b7f5b367ddefd8593e2f07bdfd60d6e5d..bb96c7479b6bd1b5262f6b6e69a1eac291114b61 100644
--- a/src/optimizing-compiler-thread.h
+++ b/src/optimizing-compiler-thread.h
@@ -50,11 +50,12 @@ class OptimizingCompilerThread : public Thread {
thread_id_(0),
#endif
isolate_(isolate),
- stop_semaphore_(OS::CreateSemaphore(0)),
- input_queue_semaphore_(OS::CreateSemaphore(0)) {
+ stop_semaphore_(0),
+ input_queue_semaphore_(0) {
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
NoBarrier_Store(&queue_length_, static_cast<AtomicWord>(0));
}
+ ~OptimizingCompilerThread() {}
void Run();
void Stop();
@@ -80,13 +81,6 @@ class OptimizingCompilerThread : public Thread {
bool IsOptimizerThread();
#endif
- ~OptimizingCompilerThread() {
- delete input_queue_semaphore_;
- delete stop_semaphore_;
-#ifdef DEBUG
-#endif
- }
-
private:
enum StopFlag { CONTINUE, STOP, FLUSH };
@@ -101,8 +95,8 @@ class OptimizingCompilerThread : public Thread {
#endif
Isolate* isolate_;
- Semaphore* stop_semaphore_;
- Semaphore* input_queue_semaphore_;
+ Semaphore stop_semaphore_;
+ Semaphore input_queue_semaphore_;
UnboundQueue<OptimizingCompiler*> input_queue_;
UnboundQueue<OptimizingCompiler*> output_queue_;
Mutex install_mutex_;
« no previous file with comments | « src/marking-thread.cc ('k') | src/optimizing-compiler-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698