Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85161 - trunk/boost/signals2/detail
From: fmhess_at_[hidden]
Date: 2013-07-25 21:02:27


Author: fmhess
Date: 2013-07-25 21:02:26 EDT (Thu, 25 Jul 2013)
New Revision: 85161
URL: http://svn.boost.org/trac/boost/changeset/85161

Log:
Added BOOST_VERIFY checks on return values from pthread calls.
Refs #8916

Text files modified:
   trunk/boost/signals2/detail/lwm_pthreads.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/signals2/detail/lwm_pthreads.hpp
==============================================================================
--- trunk/boost/signals2/detail/lwm_pthreads.hpp Thu Jul 25 12:29:11 2013 (r85160)
+++ trunk/boost/signals2/detail/lwm_pthreads.hpp 2013-07-25 21:02:26 EDT (Thu, 25 Jul 2013) (r85161)
@@ -18,7 +18,7 @@
 # pragma once
 #endif
 
-
+#include <boost/assert.hpp>
 #include <pthread.h>
 
 namespace boost
@@ -44,20 +44,20 @@
 // 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
     }
 
     ~mutex()
     {
- pthread_mutex_destroy(&m_);
+ BOOST_VERIFY(pthread_mutex_destroy(&m_) == 0);
     }
 
     void lock()
     {
- pthread_mutex_lock(&m_);
+ BOOST_VERIFY(pthread_mutex_lock(&m_) == 0);
     }
 
     bool try_lock()
@@ -67,7 +67,7 @@
 
     void unlock()
     {
- pthread_mutex_unlock(&m_);
+ BOOST_VERIFY(pthread_mutex_unlock(&m_) == 0);
     }
 };
 


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