| Index: src/platform-cygwin.cc
|
| diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc
|
| index 79134da35255b529e95920fc6542116fe9402dba..f0cf07b60ceb5bd92a09e1ed6303e255c601f673 100644
|
| --- a/src/platform-cygwin.cc
|
| +++ b/src/platform-cygwin.cc
|
| @@ -617,7 +617,7 @@ class SamplerThread : public Thread {
|
| 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());
|
| @@ -628,7 +628,7 @@ class SamplerThread : public Thread {
|
| }
|
|
|
| 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_);
|
| @@ -714,7 +714,7 @@ class SamplerThread : public Thread {
|
| RuntimeProfilerRateLimiter rate_limiter_;
|
|
|
| // Protects the process wide state below.
|
| - static Mutex* mutex_;
|
| + static LazyMutex mutex_;
|
| static SamplerThread* instance_;
|
|
|
| private:
|
| @@ -722,7 +722,7 @@ class SamplerThread : public Thread {
|
| };
|
|
|
|
|
| -Mutex* SamplerThread::mutex_ = OS::CreateMutex();
|
| +LazyMutex SamplerThread::mutex_ = LAZY_MUTEX_INITIALIZER;
|
| SamplerThread* SamplerThread::instance_ = NULL;
|
|
|
|
|
|
|