File indexing completed on 2024-11-15 09:32:45
0001 #ifndef BOOST_THREAD_ONCE_HPP
0002 #define BOOST_THREAD_ONCE_HPP
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <boost/thread/detail/config.hpp>
0013
0014 #ifdef BOOST_MSVC
0015 # pragma warning(push)
0016 # pragma warning(disable: 4702)
0017 #endif
0018
0019 #include <boost/thread/detail/platform.hpp>
0020 #if defined(BOOST_THREAD_PLATFORM_WIN32)
0021 #include <boost/thread/win32/once.hpp>
0022 #elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
0023 #if defined BOOST_THREAD_ONCE_FAST_EPOCH
0024 #include <boost/thread/pthread/once.hpp>
0025 #elif defined BOOST_THREAD_ONCE_ATOMIC
0026 #include <boost/thread/pthread/once_atomic.hpp>
0027 #else
0028 #error "Once Not Implemented"
0029 #endif
0030 #else
0031 #error "Boost threads unavailable on this platform"
0032 #endif
0033
0034 #include <boost/config/abi_prefix.hpp>
0035
0036 namespace boost
0037 {
0038
0039
0040 template<typename Function>
0041 inline void call_once(Function func,once_flag& flag)
0042
0043 {
0044 call_once(flag,func);
0045 }
0046 }
0047
0048 #include <boost/config/abi_suffix.hpp>
0049
0050 #ifdef BOOST_MSVC
0051 # pragma warning(pop)
0052 #endif
0053
0054 #endif