]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/thread/pthread/condition_variable_fwd.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / thread / pthread / condition_variable_fwd.hpp
index dc471d56a0bc414a943ce762b34056d3b8c63212..f5963486f875761c4ebf285f7084820b3b632b2f 100644 (file)
@@ -58,36 +58,29 @@ namespace boost
             // above) and must be initialized (etc) in case some
             // compilation units provide interruptions and others
             // don't.
-            res=pthread_mutex_init(&internal_mutex,NULL);
+            res=posix::pthread_mutex_init(&internal_mutex);
             if(res)
             {
                 boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread_mutex_init"));
             }
 //#endif
-            res = pthread::cond_init(cond);
+            res = posix::pthread_cond_init(&cond);
             if (res)
             {
 //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
                 // ditto
-                BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
+                BOOST_VERIFY(!posix::pthread_mutex_destroy(&internal_mutex));
 //#endif
-                boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread::cond_init"));
+                boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread_cond_init"));
             }
         }
         ~condition_variable()
         {
-            int ret;
 //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
             // ditto
-            do {
-              ret = pthread_mutex_destroy(&internal_mutex);
-            } while (ret == EINTR);
-            BOOST_ASSERT(!ret);
+            BOOST_VERIFY(!posix::pthread_mutex_destroy(&internal_mutex));
 //#endif
-            do {
-              ret = pthread_cond_destroy(&cond);
-            } while (ret == EINTR);
-            BOOST_ASSERT(!ret);
+            BOOST_VERIFY(!posix::pthread_cond_destroy(&cond));
         }
 
         void wait(unique_lock<mutex>& m);
@@ -128,7 +121,7 @@ namespace boost
         }
         bool timed_wait(
             unique_lock<mutex>& m,
-            xtime const& abs_time)
+            ::boost::xtime const& abs_time)
         {
             return timed_wait(m,system_time(abs_time));
         }
@@ -194,7 +187,7 @@ namespace boost
         template<typename predicate_type>
         bool timed_wait(
             unique_lock<mutex>& m,
-            xtime const& abs_time,predicate_type pred)
+            ::boost::xtime const& abs_time,predicate_type pred)
         {
             return timed_wait(m,system_time(abs_time),pred);
         }