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 | // enable timeout feature |
12 | #define BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS boost::interprocess::test::BaseMs |
13 | #define BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING |
14 | |
15 | #include "util.hpp" |
16 | #include <boost/assert.hpp> |
17 | #include <boost/interprocess/sync/interprocess_mutex.hpp> |
18 | #include <boost/interprocess/sync/interprocess_recursive_mutex.hpp> |
19 | #include <boost/interprocess/sync/spin/mutex.hpp> |
20 | #include "mutex_test_template.hpp" |
21 | |
22 | int main () |
23 | { |
24 | using namespace boost::interprocess; |
25 | test::test_mutex_lock_timeout<interprocess_mutex>(); |
26 | test::test_mutex_lock_timeout<interprocess_recursive_mutex>(); |
27 | test::test_mutex_lock_timeout<ipcdetail::spin_mutex>(); |
28 | |
29 | return 0; |
30 | } |
31 |