From d573e3b39d1506da7a1cf56b96ea619ff0087060 Mon Sep 17 00:00:00 2001 From: "iposva@chromium.org" Date: Mon, 27 Jul 2009 05:31:30 +0000 Subject: [PATCH] Landing patch for Timur Iskhodzhanov. Reviewed at http://codereview.chromium.org/160099 The original MacOSMutex constructor makes data race detectors a little bit crazy. Also, the new version is simpler and easier to understand. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/platform-macos.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/platform-macos.cc b/src/platform-macos.cc index b5a57e112..445f588d6 100644 --- a/src/platform-macos.cc +++ b/src/platform-macos.cc @@ -424,14 +424,10 @@ class MacOSMutex : public Mutex { public: MacOSMutex() { - // For some reason the compiler doesn't allow you to write - // "this->mutex_ = PTHREAD_..." directly on mac. - pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&m, &attr); - mutex_ = m; + pthread_mutex_init(&mutex_, &attr); } ~MacOSMutex() { pthread_mutex_destroy(&mutex_); } -- 2.34.1