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

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

Issue 23625003: Cleanup Mutex and related classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
Index: src/optimizing-compiler-thread.h
diff --git a/src/optimizing-compiler-thread.h b/src/optimizing-compiler-thread.h
index aff94eddc22429b0aeadd05f830e515d7e544eb4..b16c40be5e709147c2691700cb7752d4303b64f6 100644
--- a/src/optimizing-compiler-thread.h
+++ b/src/optimizing-compiler-thread.h
@@ -31,6 +31,7 @@
#include "atomicops.h"
#include "flags.h"
#include "platform.h"
+#include "synchronization/mutex.h"
#include "unbound-queue-inl.h"
namespace v8 {
@@ -46,12 +47,10 @@ class OptimizingCompilerThread : public Thread {
Thread("OptimizingCompilerThread"),
#ifdef DEBUG
thread_id_(0),
- thread_id_mutex_(OS::CreateMutex()),
#endif
isolate_(isolate),
stop_semaphore_(OS::CreateSemaphore(0)),
input_queue_semaphore_(OS::CreateSemaphore(0)),
- install_mutex_(OS::CreateMutex()),
time_spent_compiling_(0),
time_spent_total_(0) {
NoBarrier_Store(&stop_thread_, static_cast<AtomicWord>(CONTINUE));
@@ -83,11 +82,9 @@ class OptimizingCompilerThread : public Thread {
#endif
~OptimizingCompilerThread() {
- delete install_mutex_;
delete input_queue_semaphore_;
delete stop_semaphore_;
#ifdef DEBUG
- delete thread_id_mutex_;
#endif
}
@@ -101,7 +98,7 @@ class OptimizingCompilerThread : public Thread {
#ifdef DEBUG
int thread_id_;
- Mutex* thread_id_mutex_;
+ Mutex thread_id_mutex_;
#endif
Isolate* isolate_;
@@ -109,7 +106,7 @@ class OptimizingCompilerThread : public Thread {
Semaphore* input_queue_semaphore_;
UnboundQueue<OptimizingCompiler*> input_queue_;
UnboundQueue<OptimizingCompiler*> output_queue_;
- Mutex* install_mutex_;
+ Mutex install_mutex_;
volatile AtomicWord stop_thread_;
volatile Atomic32 queue_length_;
int64_t time_spent_compiling_;
« src/isolate.cc ('K') | « src/log-utils.cc ('k') | src/optimizing-compiler-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698