| Index: src/platform-macos.cc
|
| diff --git a/src/platform-macos.cc b/src/platform-macos.cc
|
| index 30e2b890bb75faee074808802b2e9ae3eac59ed0..52f6d7ea50638fe380c40a86779f76c8e3e27632 100644
|
| --- a/src/platform-macos.cc
|
| +++ b/src/platform-macos.cc
|
| @@ -495,7 +495,8 @@ class Thread::PlatformData : public Malloced {
|
|
|
| Thread::Thread(const Options& options)
|
| : data_(new PlatformData),
|
| - stack_size_(options.stack_size()) {
|
| + stack_size_(options.stack_size()),
|
| + start_semaphore_(NULL) {
|
| set_name(options.name());
|
| }
|
|
|
| @@ -530,7 +531,7 @@ static void* ThreadEntry(void* arg) {
|
| thread->data()->thread_ = pthread_self();
|
| SetThreadName(thread->name());
|
| ASSERT(thread->data()->thread_ != kNoThread);
|
| - thread->Run();
|
| + thread->NotifyStartedAndRun();
|
| return NULL;
|
| }
|
|
|
| @@ -776,7 +777,7 @@ class SamplerThread : public Thread {
|
| SamplerRegistry::AddActiveSampler(sampler);
|
| if (instance_ == NULL) {
|
| instance_ = new SamplerThread(sampler->interval());
|
| - instance_->Start();
|
| + instance_->StartSynchronously();
|
| } else {
|
| ASSERT(instance_->interval_ == sampler->interval());
|
| }
|
|
|