eb58f3ed834318890f0deebf31e194217c3d6934
[platform/upstream/boost.git] / libs / interprocess / test / recursive_mutex_test.cpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2004-2011. 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
11 #include <boost/interprocess/detail/config_begin.hpp>
12 #include <boost/interprocess/detail/workaround.hpp>
13 #if defined(BOOST_INTERPROCESS_WINDOWS)
14 #include <boost/interprocess/sync/windows/recursive_mutex.hpp>
15 #include <boost/interprocess/sync/spin/recursive_mutex.hpp>
16 #endif
17 #include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
18 #include <boost/interprocess/sync/scoped_lock.hpp>
19 #include "mutex_test_template.hpp"
20
21 int main ()
22 {
23    using namespace boost::interprocess;
24    #if defined(BOOST_INTERPROCESS_WINDOWS)
25       //
26       test::test_all_lock<ipcdetail::windows_recursive_mutex>();
27       test::test_all_mutex<ipcdetail::windows_recursive_mutex>();
28       test::test_all_recursive_lock<ipcdetail::windows_recursive_mutex>();
29       //
30       test::test_all_lock<ipcdetail::spin_recursive_mutex>();
31       test::test_all_mutex<ipcdetail::spin_recursive_mutex>();
32       test::test_all_recursive_lock<ipcdetail::spin_recursive_mutex>();
33    #endif
34    //
35    test::test_all_lock<interprocess_recursive_mutex>();
36    test::test_all_mutex<interprocess_recursive_mutex>();
37    test::test_all_recursive_lock<interprocess_recursive_mutex>();
38
39    return 0;
40 }
41
42 #include <boost/interprocess/detail/config_end.hpp>