1 #ifndef BOOST_THREAD_ONCE_HPP
2 #define BOOST_THREAD_ONCE_HPP
6 // (C) Copyright 2006-7 Anthony Williams
8 // Distributed under the Boost Software License, Version 1.0. (See
9 // accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 #include <boost/thread/detail/config.hpp>
13 #include <boost/thread/detail/platform.hpp>
14 #if defined(BOOST_THREAD_PLATFORM_WIN32)
15 #include <boost/thread/win32/once.hpp>
16 #elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
17 #if defined BOOST_THREAD_ONCE_FAST_EPOCH
18 #include <boost/thread/pthread/once.hpp>
19 #elif defined BOOST_THREAD_ONCE_ATOMIC
20 #include <boost/thread/pthread/once_atomic.hpp>
22 #error "Once Not Implemented"
25 #error "Boost threads unavailable on this platform"
28 #include <boost/config/abi_prefix.hpp>
32 // template<class Callable, class ...Args> void
33 // call_once(once_flag& flag, Callable&& func, Args&&... args);
34 template<typename Function>
35 inline void call_once(Function func,once_flag& flag)
36 //inline void call_once(void (*func)(),once_flag& flag)
42 #include <boost/config/abi_suffix.hpp>