| Index: src/platform-freebsd.cc
|
| diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc
|
| index a5981b19c3c11333247b103ec78a6376e30940b7..a544e8b52909e987fbc994e67dd5b43c7eaa3184 100644
|
| --- a/src/platform-freebsd.cc
|
| +++ b/src/platform-freebsd.cc
|
| @@ -717,7 +717,7 @@ class SignalSender : public Thread {
|
| interval_(interval) {}
|
|
|
| static void AddActiveSampler(Sampler* sampler) {
|
| - ScopedLock lock(mutex_);
|
| + ScopedLock lock(mutex_.Pointer());
|
| SamplerRegistry::AddActiveSampler(sampler);
|
| if (instance_ == NULL) {
|
| // Install a signal handler.
|
| @@ -737,7 +737,7 @@ class SignalSender : 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_);
|
| @@ -830,7 +830,7 @@ class SignalSender : public Thread {
|
| RuntimeProfilerRateLimiter rate_limiter_;
|
|
|
| // Protects the process wide state below.
|
| - static Mutex* mutex_;
|
| + static LazyMutex mutex_;
|
| static SignalSender* instance_;
|
| static bool signal_handler_installed_;
|
| static struct sigaction old_signal_handler_;
|
| @@ -839,7 +839,7 @@ class SignalSender : public Thread {
|
| DISALLOW_COPY_AND_ASSIGN(SignalSender);
|
| };
|
|
|
| -Mutex* SignalSender::mutex_ = OS::CreateMutex();
|
| +LazyMutex SignalSender::mutex_ = LAZY_MUTEX_INITIALIZER;
|
| SignalSender* SignalSender::instance_ = NULL;
|
| struct sigaction SignalSender::old_signal_handler_;
|
| bool SignalSender::signal_handler_installed_ = false;
|
|
|