diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 15:38:27 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 15:38:27 +0000 |
commit | 6723f835ff0247e5bffad9e92d8d42a8c3ae1b3b (patch) | |
tree | 874b2b79287e69bd58ca6419c764ed26e2573829 /base/lock_impl_posix.cc | |
parent | abfd15b40f52900239ec1fb443ade9eab11711f6 (diff) | |
download | chromium_src-6723f835ff0247e5bffad9e92d8d42a8c3ae1b3b.zip chromium_src-6723f835ff0247e5bffad9e92d8d42a8c3ae1b3b.tar.gz chromium_src-6723f835ff0247e5bffad9e92d8d42a8c3ae1b3b.tar.bz2 |
recursive_mutex
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/lock_impl_posix.cc')
-rw-r--r-- | base/lock_impl_posix.cc | 9 |
1 files changed, 8 insertions, 1 deletions
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); } |