Bug 824390 - DMD: Don't use PTHREAD_MUTEX_INITIALIZER for non-static mutexes. r=jlebar.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 23 Dec 2012 17:35:23 -0800
changeset 126085 4aeb3016da0347b5cf786810cf26ab879796e88f
parent 126084 3af8b1ebd83ae0112e0476ead81299f84f7c6a3e
child 126086 eb1a9250d68a417350759a97c8155e2a19e632ae
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs824390
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 824390 - DMD: Don't use PTHREAD_MUTEX_INITIALIZER for non-static mutexes. r=jlebar.
memory/replace/dmd/DMD.cpp
--- a/memory/replace/dmd/DMD.cpp
+++ b/memory/replace/dmd/DMD.cpp
@@ -313,18 +313,19 @@ public:
 class MutexBase
 {
   pthread_mutex_t mMutex;
 
   DISALLOW_COPY_AND_ASSIGN(MutexBase);
 
 public:
   MutexBase()
-    : mMutex(PTHREAD_MUTEX_INITIALIZER)
-  {}
+  {
+    pthread_mutex_init(&mMutex, NULL);
+  }
 
   void Lock()
   {
     pthread_mutex_lock(&mMutex);
   }
 
   void Unlock()
   {