Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:32:45

0001 #ifndef BOOST_THREAD_ONCE_HPP
0002 #define BOOST_THREAD_ONCE_HPP
0003 
0004 //  once.hpp
0005 //
0006 //  (C) Copyright 2006-7 Anthony Williams
0007 //
0008 //  Distributed under the Boost Software License, Version 1.0. (See
0009 //  accompanying file LICENSE_1_0.txt or copy at
0010 //  http://www.boost.org/LICENSE_1_0.txt)
0011 
0012 #include <boost/thread/detail/config.hpp>
0013 
0014 #ifdef BOOST_MSVC
0015 # pragma warning(push)
0016 # pragma warning(disable: 4702) // unreachable code
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   // template<class Callable, class ...Args> void
0039   // call_once(once_flag& flag, Callable&& func, Args&&... args);
0040 template<typename Function>
0041 inline void call_once(Function func,once_flag& flag)
0042 //inline void call_once(void (*func)(),once_flag& flag)
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