lightweight_mutex.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. //
  8. // boost/detail/lightweight_mutex.hpp - lightweight mutex
  9. //
  10. // Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.
  11. //
  12. // Distributed under the Boost Software License, Version 1.0. (See
  13. // accompanying file LICENSE_1_0.txt or copy at
  14. // http://www.boost.org/LICENSE_1_0.txt)
  15. //
  16. // typedef <unspecified> boost::detail::lightweight_mutex;
  17. //
  18. // boost::detail::lightweight_mutex is a header-only implementation of
  19. // a subset of the Mutex concept requirements:
  20. //
  21. // http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex
  22. //
  23. // It maps to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX.
  24. //
  25. #include <boost/config.hpp>
  26. #if !defined(BOOST_NO_CXX11_HDR_MUTEX )
  27. # include <boost/smart_ptr/detail/lwm_std_mutex.hpp>
  28. #elif defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  29. # include <boost/smart_ptr/detail/lwm_win32_cs.hpp>
  30. #else
  31. # include <boost/smart_ptr/detail/lwm_pthreads.hpp>
  32. #endif
  33. #endif // #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED