/Src/Dependencies/Boost/boost/thread/once.hpp

http://hadesmem.googlecode.com/ · C++ Header · 33 lines · 20 code · 6 blank · 7 comment · 0 complexity · bbae7bbc4e4dca13d29b34b51b2576d6 MD5 · raw file

  1. #ifndef BOOST_THREAD_ONCE_HPP
  2. #define BOOST_THREAD_ONCE_HPP
  3. // once.hpp
  4. //
  5. // (C) Copyright 2006-7 Anthony Williams
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See
  8. // accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #include <boost/thread/detail/platform.hpp>
  11. #if defined(BOOST_THREAD_PLATFORM_WIN32)
  12. #include <boost/thread/win32/once.hpp>
  13. #elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
  14. #include <boost/thread/pthread/once.hpp>
  15. #else
  16. #error "Boost threads unavailable on this platform"
  17. #endif
  18. #include <boost/config/abi_prefix.hpp>
  19. namespace boost
  20. {
  21. inline void call_once(void (*func)(),once_flag& flag)
  22. {
  23. call_once(flag,func);
  24. }
  25. }
  26. #include <boost/config/abi_suffix.hpp>
  27. #endif