mutex_test.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #include <boost/interprocess/sync/interprocess_mutex.hpp>
  13. #include "mutex_test_template.hpp"
  14. #if defined(BOOST_INTERPROCESS_WINDOWS)
  15. #include <boost/interprocess/sync/windows/mutex.hpp>
  16. #include <boost/interprocess/sync/spin/mutex.hpp>
  17. #endif
  18. int main ()
  19. {
  20. using namespace boost::interprocess;
  21. #if defined(BOOST_INTERPROCESS_WINDOWS)
  22. test::test_all_lock<ipcdetail::windows_mutex>();
  23. test::test_all_mutex<ipcdetail::windows_mutex>();
  24. test::test_all_lock<ipcdetail::spin_mutex>();
  25. test::test_all_mutex<ipcdetail::spin_mutex>();
  26. #endif
  27. test::test_all_lock<interprocess_mutex>();
  28. test::test_all_mutex<interprocess_mutex>();
  29. return 0;
  30. }
  31. #include <boost/interprocess/detail/config_end.hpp>