1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/thread/barrier.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,44 @@
1.4 +// Copyright (C) 2002-2003
1.5 +// David Moore, William E. Kempf
1.6 +//
1.7 +// Distributed under the Boost Software License, Version 1.0. (See accompanying
1.8 +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1.9 +
1.10 +#ifndef BOOST_BARRIER_JDM030602_HPP
1.11 +#define BOOST_BARRIER_JDM030602_HPP
1.12 +
1.13 +#include <boost/thread/detail/config.hpp>
1.14 +
1.15 +#include <boost/thread/mutex.hpp>
1.16 +#include <boost/thread/condition.hpp>
1.17 +
1.18 +namespace boost {
1.19 +
1.20 +class BOOST_THREAD_DECL barrier
1.21 +{
1.22 +public:
1.23 + barrier(unsigned int count);
1.24 + ~barrier();
1.25 +
1.26 + bool wait();
1.27 +
1.28 +private:
1.29 + mutex m_mutex;
1.30 +// disable warnings about non dll import
1.31 +// see: http://www.boost.org/more/separate_compilation.html#dlls
1.32 +#ifdef BOOST_MSVC
1.33 +# pragma warning(push)
1.34 +# pragma warning(disable: 4251 4231 4660 4275)
1.35 +#endif
1.36 + condition m_cond;
1.37 +#ifdef BOOST_MSVC
1.38 +# pragma warning(pop)
1.39 +#endif
1.40 + unsigned int m_threshold;
1.41 + unsigned int m_count;
1.42 + unsigned int m_generation;
1.43 +};
1.44 +
1.45 +} // namespace boost
1.46 +
1.47 +#endif