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/boost/smart_ptr/detail/sp_counted_base_pt.hpp
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/boost/smart_ptr/detail/sp_counted_base_pt.hpp')
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp
index 3c56fec..a16d2d8 100644
--- a/3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp
+++ b/3rdParty/Boost/src/boost/smart_ptr/detail/sp_counted_base_pt.hpp
@@ -19,6 +19,7 @@
//
#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/assert.hpp>
#include <pthread.h>
namespace boost
@@ -46,15 +47,15 @@ public:
// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
#if defined(__hpux) && defined(_DECTHREADS_)
- pthread_mutex_init( &m_, pthread_mutexattr_default );
+ BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 );
#else
- pthread_mutex_init( &m_, 0 );
+ BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 );
#endif
}
virtual ~sp_counted_base() // nothrow
{
- pthread_mutex_destroy( &m_ );
+ BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 );
}
// dispose() is called when use_count_ drops to zero, to release
@@ -70,27 +71,28 @@ public:
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
- pthread_mutex_lock( &m_ );
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
++use_count_;
- pthread_mutex_unlock( &m_ );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
}
bool add_ref_lock() // true on success
{
- pthread_mutex_lock( &m_ );
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
bool r = use_count_ == 0? false: ( ++use_count_, true );
- pthread_mutex_unlock( &m_ );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
return r;
}
void release() // nothrow
{
- pthread_mutex_lock( &m_ );
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
long new_use_count = --use_count_;
- pthread_mutex_unlock( &m_ );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
if( new_use_count == 0 )
{
@@ -101,16 +103,16 @@ public:
void weak_add_ref() // nothrow
{
- pthread_mutex_lock( &m_ );
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
++weak_count_;
- pthread_mutex_unlock( &m_ );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
}
void weak_release() // nothrow
{
- pthread_mutex_lock( &m_ );
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
long new_weak_count = --weak_count_;
- pthread_mutex_unlock( &m_ );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
if( new_weak_count == 0 )
{
@@ -120,9 +122,9 @@ public:
long use_count() const // nothrow
{
- pthread_mutex_lock( &m_ );
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
long r = use_count_;
- pthread_mutex_unlock( &m_ );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
return r;
}