Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / interprocess / test / condition_test.cpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2006-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 <boost/interprocess/detail/config_begin.hpp>
12 #include <boost/interprocess/detail/workaround.hpp>
13 #include <boost/interprocess/sync/interprocess_condition.hpp>
14 #include <boost/interprocess/sync/interprocess_mutex.hpp>
15 #include "condition_test_template.hpp"
16
17 #if defined(BOOST_INTERPROCESS_WINDOWS)
18 #include <boost/interprocess/sync/windows/condition.hpp>
19 #include <boost/interprocess/sync/windows/mutex.hpp>
20 #include <boost/interprocess/sync/spin/condition.hpp>
21 #include <boost/interprocess/sync/spin/mutex.hpp>
22 #endif
23
24 using namespace boost::interprocess;
25
26 int main ()
27 {
28    #if defined(BOOST_INTERPROCESS_WINDOWS)
29       if(!test::do_test_condition<ipcdetail::windows_condition, ipcdetail::windows_mutex>())
30          return 1;
31       if(!test::do_test_condition<ipcdetail::spin_condition, ipcdetail::spin_mutex>())
32          return 1;
33    #endif
34    if(!test::do_test_condition<interprocess_condition, interprocess_mutex>())
35       return 1;
36
37    return 0;
38 }
39
40 #include <boost/interprocess/detail/config_end.hpp>