|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85330 - branches/release/boost/flyweight/detail
From: joaquin_at_[hidden]
Date: 2013-08-13 02:34:09
Author: joaquin
Date: 2013-08-13 02:34:08 EDT (Tue, 13 Aug 2013)
New Revision: 85330
URL: http://svn.boost.org/trac/boost/changeset/85330
Log:
merged [85302] from trunk
Text files modified:
branches/release/boost/flyweight/detail/recursive_lw_mutex.hpp | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
Modified: branches/release/boost/flyweight/detail/recursive_lw_mutex.hpp
==============================================================================
--- branches/release/boost/flyweight/detail/recursive_lw_mutex.hpp Mon Aug 12 18:15:14 2013 (r85329)
+++ branches/release/boost/flyweight/detail/recursive_lw_mutex.hpp 2013-08-13 02:34:08 EDT (Tue, 13 Aug 2013) (r85330)
@@ -1,4 +1,4 @@
-/* Copyright 2006-2008 Joaquin M Lopez Munoz.
+/* Copyright 2006-2013 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -39,6 +39,7 @@
#else
/* code shamelessly ripped from <boost/detail/lwm_pthreads.hpp> */
+#include <boost/assert.hpp>
#include <boost/noncopyable.hpp>
#include <pthread.h>
@@ -53,10 +54,10 @@
recursive_lightweight_mutex()
{
pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr);
- pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
- pthread_mutex_init(&m_,&attr);
- pthread_mutexattr_destroy(&attr);
+ BOOST_VERIFY(pthread_mutexattr_init(&attr)==0);
+ BOOST_VERIFY(pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE)==0);
+ BOOST_VERIFY(pthread_mutex_init(&m_,&attr)==0);
+ BOOST_VERIFY(pthread_mutexattr_destroy(&attr)==0);
}
~recursive_lightweight_mutex(){pthread_mutex_destroy(&m_);}
@@ -68,10 +69,10 @@
public:
scoped_lock(recursive_lightweight_mutex& m):m_(m.m_)
{
- pthread_mutex_lock(&m_);
+ BOOST_VERIFY(pthread_mutex_lock(&m_)==0);
}
- ~scoped_lock(){pthread_mutex_unlock(&m_);}
+ ~scoped_lock(){BOOST_VERIFY(pthread_mutex_unlock(&m_)==0);}
private:
pthread_mutex_t& m_;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk