Index: test/cctest/test-lockers.cc |
diff --git a/test/cctest/test-lockers.cc b/test/cctest/test-lockers.cc |
index 90e1f757803736f05fa62e924d3514332447bfd6..a143d583fd2941622cca1f9318635aa5aecc0ab3 100644 |
--- a/test/cctest/test-lockers.cc |
+++ b/test/cctest/test-lockers.cc |
@@ -129,20 +129,18 @@ class JoinableThread { |
public: |
explicit JoinableThread(const char* name) |
: name_(name), |
- semaphore_(i::OS::CreateSemaphore(0)), |
+ semaphore_(0), |
thread_(this) { |
} |
- virtual ~JoinableThread() { |
- delete semaphore_; |
- } |
+ virtual ~JoinableThread() {} |
void Start() { |
thread_.Start(); |
} |
void Join() { |
- semaphore_->Wait(); |
+ semaphore_.Wait(); |
} |
virtual void Run() = 0; |
@@ -157,7 +155,7 @@ class JoinableThread { |
virtual void Run() { |
joinable_thread_->Run(); |
- joinable_thread_->semaphore_->Signal(); |
+ joinable_thread_->semaphore_.Signal(); |
} |
private: |
@@ -165,7 +163,7 @@ class JoinableThread { |
}; |
const char* name_; |
- i::Semaphore* semaphore_; |
+ i::Semaphore semaphore_; |
ThreadWithSemaphore thread_; |
friend class ThreadWithSemaphore; |