1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/thread/once.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,37 @@
1.4 +// Copyright (C) 2001-2003
1.5 +// 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_ONCE_WEK080101_HPP
1.11 +#define BOOST_ONCE_WEK080101_HPP
1.12 +
1.13 +#include <boost/thread/detail/config.hpp>
1.14 +
1.15 +#if defined(BOOST_HAS_PTHREADS)
1.16 +# include <pthread.h>
1.17 +#endif
1.18 +
1.19 +namespace boost {
1.20 +
1.21 +#if defined(BOOST_HAS_PTHREADS)
1.22 +
1.23 +typedef pthread_once_t once_flag;
1.24 +#define BOOST_ONCE_INIT PTHREAD_ONCE_INIT
1.25 +
1.26 +#elif (defined(BOOST_HAS_WINTHREADS) || defined(BOOST_HAS_MPTASKS))
1.27 +
1.28 +typedef long once_flag;
1.29 +#define BOOST_ONCE_INIT 0
1.30 +
1.31 +#endif
1.32 +
1.33 +void BOOST_THREAD_DECL call_once(void (*func)(), once_flag& flag);
1.34 +
1.35 +} // namespace boost
1.36 +
1.37 +// Change Log:
1.38 +// 1 Aug 01 WEKEMPF Initial version.
1.39 +
1.40 +#endif // BOOST_ONCE_WEK080101_HPP