| Index: src/platform-cygwin.cc
|
| ===================================================================
|
| --- src/platform-cygwin.cc (revision 11005)
|
| +++ src/platform-cygwin.cc (working copy)
|
| @@ -628,7 +628,7 @@
|
| interval_(interval) {}
|
|
|
| static void AddActiveSampler(Sampler* sampler) {
|
| - ScopedLock lock(mutex_);
|
| + ScopedLock lock(mutex_.Pointer());
|
| SamplerRegistry::AddActiveSampler(sampler);
|
| if (instance_ == NULL) {
|
| instance_ = new SamplerThread(sampler->interval());
|
| @@ -639,7 +639,7 @@
|
| }
|
|
|
| static void RemoveActiveSampler(Sampler* sampler) {
|
| - ScopedLock lock(mutex_);
|
| + ScopedLock lock(mutex_.Pointer());
|
| SamplerRegistry::RemoveActiveSampler(sampler);
|
| if (SamplerRegistry::GetState() == SamplerRegistry::HAS_NO_SAMPLERS) {
|
| RuntimeProfiler::StopRuntimeProfilerThreadBeforeShutdown(instance_);
|
| @@ -725,7 +725,7 @@
|
| RuntimeProfilerRateLimiter rate_limiter_;
|
|
|
| // Protects the process wide state below.
|
| - static Mutex* mutex_;
|
| + static LazyMutex mutex_;
|
| static SamplerThread* instance_;
|
|
|
| private:
|
| @@ -733,7 +733,7 @@
|
| };
|
|
|
|
|
| -Mutex* SamplerThread::mutex_ = OS::CreateMutex();
|
| +LazyMutex SamplerThread::mutex_ = LAZY_MUTEX_INITIALIZER;
|
| SamplerThread* SamplerThread::instance_ = NULL;
|
|
|
|
|
|
|