condition_test.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // (C) Copyright Ion Gaztanaga 2006-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_condition.hpp>
  13. #include <boost/interprocess/sync/interprocess_mutex.hpp>
  14. #include "condition_test_template.hpp"
  15. #if defined(BOOST_INTERPROCESS_WINDOWS)
  16. #include <boost/interprocess/sync/windows/condition.hpp>
  17. #include <boost/interprocess/sync/windows/mutex.hpp>
  18. #include <boost/interprocess/sync/spin/condition.hpp>
  19. #include <boost/interprocess/sync/spin/mutex.hpp>
  20. #endif
  21. using namespace boost::interprocess;
  22. int main ()
  23. {
  24. #if defined(BOOST_INTERPROCESS_WINDOWS)
  25. if(!test::do_test_condition<ipcdetail::windows_condition, ipcdetail::windows_mutex>())
  26. return 1;
  27. if(!test::do_test_condition<ipcdetail::spin_condition, ipcdetail::spin_mutex>())
  28. return 1;
  29. #endif
  30. if(!test::do_test_condition<interprocess_condition, interprocess_mutex>())
  31. return 1;
  32. return 0;
  33. }
  34. #include <boost/interprocess/detail/config_end.hpp>