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 | |
11 | #include "mutex_test_template.hpp" |
12 | #include "sharable_mutex_test_template.hpp" |
13 | #include "named_creation_template.hpp" |
14 | #include <boost/interprocess/sync/named_upgradable_mutex.hpp> |
15 | #include <string> |
16 | #include "get_process_id_name.hpp" |
17 | |
18 | using namespace boost::interprocess; |
19 | |
20 | int main () |
21 | { |
22 | int ret = 0; |
23 | BOOST_TRY{ |
24 | named_upgradable_mutex::remove(name: test::get_process_id_name()); |
25 | test::test_named_creation< test::named_sync_creation_test_wrapper<named_upgradable_mutex> >(); |
26 | #if defined(BOOST_INTERPROCESS_WCHAR_NAMED_RESOURCES) |
27 | test::test_named_creation< test::named_sync_creation_test_wrapper_w<named_upgradable_mutex> >(); |
28 | #endif |
29 | test::test_all_lock< test::named_sync_wrapper<named_upgradable_mutex> >(); |
30 | test::test_all_mutex<test::named_sync_wrapper<named_upgradable_mutex> >(); |
31 | test::test_all_sharable_mutex<test::named_sync_wrapper<named_upgradable_mutex> >(); |
32 | } |
33 | BOOST_CATCH(std::exception &ex){ |
34 | std::cout << ex.what() << std::endl; |
35 | ret = 1; |
36 | } BOOST_CATCH_END |
37 | named_upgradable_mutex::remove(name: test::get_process_id_name()); |
38 | return ret; |
39 | } |
40 |