Revision: 2535
Author: [email protected]
Date: Sun Jul 26 22:31:30 2009
Log: 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.


http://code.google.com/p/v8/source/detail?r=2535

Modified:
  /branches/bleeding_edge/src/platform-macos.cc

=======================================
--- /branches/bleeding_edge/src/platform-macos.cc       Tue Jul 21 10:25:07 2009
+++ /branches/bleeding_edge/src/platform-macos.cc       Sun Jul 26 22:31:30 2009
@@ -424,14 +424,10 @@
   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_); }

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to