recursive_mutex

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@650 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 6723f835ff0247e5bffad9e92d8d42a8c3ae1b3b
diff --git a/base/lock_impl_posix.cc b/base/lock_impl_posix.cc
index aceb414..20cd894 100644
--- a/base/lock_impl_posix.cc
+++ b/base/lock_impl_posix.cc
@@ -34,7 +34,14 @@
 #include "base/logging.h"
 
 LockImpl::LockImpl() {
-  int rv = pthread_mutex_init(&os_lock_, NULL);
+  pthread_mutexattr_t mta;
+  int rv = pthread_mutexattr_init(&mta);
+  DCHECK(rv == 0);
+  //rv = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE);
+  DCHECK(rv == 0);
+  rv = pthread_mutex_init(&os_lock_, &mta);
+  DCHECK(rv == 0);
+  rv = pthread_mutexattr_destroy(&mta);
   DCHECK(rv == 0);
 }