File tree Expand file tree Collapse file tree
include/boost/thread/pthread Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,14 +76,11 @@ namespace boost
7676 }
7777 ~condition_variable ()
7878 {
79- int ret;
8079// #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
8180 // ditto
82- ret = posix::pthread_mutex_destroy (&internal_mutex);
83- BOOST_ASSERT (!ret);
81+ BOOST_VERIFY (!posix::pthread_mutex_destroy (&internal_mutex));
8482// #endif
85- ret = posix::pthread_cond_destroy (&cond);
86- BOOST_ASSERT (!ret);
83+ BOOST_VERIFY (!posix::pthread_cond_destroy (&cond));
8784 }
8885
8986 void wait (unique_lock<mutex>& m);
Original file line number Diff line number Diff line change @@ -53,9 +53,7 @@ namespace boost
5353 }
5454 ~mutex ()
5555 {
56- int const res = posix::pthread_mutex_destroy (&m);
57- boost::ignore_unused (res);
58- BOOST_ASSERT (!res);
56+ BOOST_VERIFY (!posix::pthread_mutex_destroy (&m));
5957 }
6058
6159 void lock () BOOST_THREAD_ACQUIRE ()
@@ -69,13 +67,7 @@ namespace boost
6967
7068 void unlock () BOOST_THREAD_RELEASE ()
7169 {
72- int res = posix::pthread_mutex_unlock (&m);
73- (void )res;
74- BOOST_ASSERT (res == 0 );
75- // if (res)
76- // {
77- // boost::throw_exception(lock_error(res,"boost: mutex unlock failed in pthread_mutex_unlock"));
78- // }
70+ BOOST_VERIFY (!posix::pthread_mutex_unlock (&m));
7971 }
8072
8173 bool try_lock () BOOST_THREAD_TRY_ACQUIRE (true )
@@ -184,13 +176,7 @@ namespace boost
184176
185177 void unlock ()
186178 {
187- int res = posix::pthread_mutex_unlock (&m);
188- (void )res;
189- BOOST_ASSERT (res == 0 );
190- // if (res)
191- // {
192- // boost::throw_exception(lock_error(res,"boost: mutex unlock failed in pthread_mutex_unlock"));
193- // }
179+ BOOST_VERIFY (!posix::pthread_mutex_unlock (&m));
194180 }
195181
196182 bool try_lock ()
You can’t perform that action at this time.
0 commit comments