/Src/Dependencies/Boost/boost/thread/win32/recursive_mutex.hpp

http://hadesmem.googlecode.com/ · C++ Header · 68 lines · 50 code · 11 blank · 7 comment · 0 complexity · 48ea8df5e42eb6b29081efcddf70a7b2 MD5 · raw file

  1. #ifndef BOOST_RECURSIVE_MUTEX_WIN32_HPP
  2. #define BOOST_RECURSIVE_MUTEX_WIN32_HPP
  3. // recursive_mutex.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/utility.hpp>
  11. #include "basic_recursive_mutex.hpp"
  12. #include <boost/thread/exceptions.hpp>
  13. #include <boost/thread/locks.hpp>
  14. #include <boost/config/abi_prefix.hpp>
  15. namespace boost
  16. {
  17. class recursive_mutex:
  18. public ::boost::detail::basic_recursive_mutex
  19. {
  20. private:
  21. recursive_mutex(recursive_mutex const&);
  22. recursive_mutex& operator=(recursive_mutex const&);
  23. public:
  24. recursive_mutex()
  25. {
  26. ::boost::detail::basic_recursive_mutex::initialize();
  27. }
  28. ~recursive_mutex()
  29. {
  30. ::boost::detail::basic_recursive_mutex::destroy();
  31. }
  32. typedef unique_lock<recursive_mutex> scoped_lock;
  33. typedef detail::try_lock_wrapper<recursive_mutex> scoped_try_lock;
  34. };
  35. typedef recursive_mutex recursive_try_mutex;
  36. class recursive_timed_mutex:
  37. public ::boost::detail::basic_recursive_timed_mutex
  38. {
  39. private:
  40. recursive_timed_mutex(recursive_timed_mutex const&);
  41. recursive_timed_mutex& operator=(recursive_timed_mutex const&);
  42. public:
  43. recursive_timed_mutex()
  44. {
  45. ::boost::detail::basic_recursive_timed_mutex::initialize();
  46. }
  47. ~recursive_timed_mutex()
  48. {
  49. ::boost::detail::basic_recursive_timed_mutex::destroy();
  50. }
  51. typedef unique_lock<recursive_timed_mutex> scoped_timed_lock;
  52. typedef detail::try_lock_wrapper<recursive_timed_mutex> scoped_try_lock;
  53. typedef scoped_timed_lock scoped_lock;
  54. };
  55. }
  56. #include <boost/config/abi_suffix.hpp>
  57. #endif