recursive_mutex_test.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2004-2012. Distributed under the Boost
  4. // Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/interprocess for documentation.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #include <boost/interprocess/detail/config_begin.hpp>
  11. #include <boost/interprocess/detail/workaround.hpp>
  12. #if defined(BOOST_INTERPROCESS_WINDOWS)
  13. #include <boost/interprocess/sync/windows/recursive_mutex.hpp>
  14. #include <boost/interprocess/sync/spin/recursive_mutex.hpp>
  15. #endif
  16. #include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
  17. #include <boost/interprocess/sync/scoped_lock.hpp>
  18. #include "mutex_test_template.hpp"
  19. int main ()
  20. {
  21. using namespace boost::interprocess;
  22. #if defined(BOOST_INTERPROCESS_WINDOWS)
  23. //
  24. test::test_all_lock<ipcdetail::windows_recursive_mutex>();
  25. test::test_all_mutex<ipcdetail::windows_recursive_mutex>();
  26. test::test_all_recursive_lock<ipcdetail::windows_recursive_mutex>();
  27. //
  28. test::test_all_lock<ipcdetail::spin_recursive_mutex>();
  29. test::test_all_mutex<ipcdetail::spin_recursive_mutex>();
  30. test::test_all_recursive_lock<ipcdetail::spin_recursive_mutex>();
  31. #endif
  32. //
  33. test::test_all_lock<interprocess_recursive_mutex>();
  34. test::test_all_mutex<interprocess_recursive_mutex>();
  35. test::test_all_recursive_lock<interprocess_recursive_mutex>();
  36. return 0;
  37. }
  38. #include <boost/interprocess/detail/config_end.hpp>