summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/libs/regex/src/static_mutex.cpp')
-rw-r--r--3rdParty/Boost/src/libs/regex/src/static_mutex.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp b/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
index d14feb1..d02b01f 100644
--- a/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
@@ -18,6 +18,7 @@
#define BOOST_REGEX_SOURCE
#include <boost/config.hpp>
+#include <boost/assert.hpp>
#ifdef BOOST_HAS_THREADS
@@ -54,8 +55,8 @@ void scoped_static_mutex_lock::lock()
{
if(0 == m_have_lock)
{
- pthread_mutex_lock(&(m_mutex.m_mutex));
- m_have_lock = true;
+ // Client code will throw if this fails:
+ m_have_lock = (pthread_mutex_lock(&(m_mutex.m_mutex)) == 0);
}
}
@@ -63,7 +64,10 @@ void scoped_static_mutex_lock::unlock()
{
if(m_have_lock)
{
- pthread_mutex_unlock(&(m_mutex.m_mutex));
+ // If this fails there's nothing we can do except assert,
+ // exceptions are out of the question as this code is called
+ // from the lock's destructor:
+ BOOST_VERIFY(pthread_mutex_unlock(&(m_mutex.m_mutex)) == 0);
m_have_lock = false;
}
}
@@ -157,7 +161,7 @@ void scoped_static_mutex_lock::lock()
{
boost::call_once(static_mutex::m_once,&static_mutex::init);
if(0 == m_plock)
- m_plock = new boost::recursive_mutex::scoped_lock(*static_mutex::m_pmutex, boost::defer_lock);
+ m_plock = new boost::unique_lock<boost::recursive_mutex>(*static_mutex::m_pmutex, boost::defer_lock);
m_plock->lock();
m_have_lock = true;
}