lw_mutex_test.cpp 630 B

12345678910111213141516171819202122232425262728
  1. //
  2. // lw_mutex_test.cpp
  3. //
  4. // Copyright 2005 Peter Dimov
  5. //
  6. // Distributed under the Boost Software License, Version 1.0. (See
  7. // accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #include <boost/detail/lightweight_mutex.hpp>
  11. // Sanity check only
  12. boost::detail::lightweight_mutex m1;
  13. int main()
  14. {
  15. boost::detail::lightweight_mutex::scoped_lock lock1( m1 );
  16. boost::detail::lightweight_mutex m2;
  17. boost::detail::lightweight_mutex m3;
  18. boost::detail::lightweight_mutex::scoped_lock lock2( m2 );
  19. boost::detail::lightweight_mutex::scoped_lock lock3( m3 );
  20. return 0;
  21. }