• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_ENABLE_TIMEOUT_WHEN_LOCKING
13 #define BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS 1000
14 
15 #include <boost/assert.hpp>
16 #include <boost/interprocess/sync/interprocess_mutex.hpp>
17 #include <boost/interprocess/sync/interprocess_recursive_mutex.hpp>
18 #include <boost/interprocess/sync/spin/mutex.hpp>
19 #include "mutex_test_template.hpp"
20 
main()21 int main ()
22 {
23    using namespace boost::interprocess;
24    test::test_mutex_lock_timeout<interprocess_mutex>();
25    test::test_mutex_lock_timeout<interprocess_recursive_mutex>();
26    test::test_mutex_lock_timeout<ipcdetail::spin_mutex>();
27 
28    return 0;
29 }
30