Imported Upstream version 1.49.0
[platform/upstream/boost.git] / boost / thread / win32 / recursive_mutex.hpp
1 #ifndef BOOST_RECURSIVE_MUTEX_WIN32_HPP
2 #define BOOST_RECURSIVE_MUTEX_WIN32_HPP
3
4 //  recursive_mutex.hpp
5 //
6 //  (C) Copyright 2006-7 Anthony Williams
7 //
8 //  Distributed under the Boost Software License, Version 1.0. (See
9 //  accompanying file LICENSE_1_0.txt or copy at
10 //  http://www.boost.org/LICENSE_1_0.txt)
11
12
13 #include <boost/utility.hpp>
14 #include <boost/thread/win32/basic_recursive_mutex.hpp>
15 #include <boost/thread/exceptions.hpp>
16 #include <boost/thread/locks.hpp>
17
18 #include <boost/config/abi_prefix.hpp>
19
20 namespace boost
21 {
22     class recursive_mutex:
23         public ::boost::detail::basic_recursive_mutex
24     {
25     private:
26         recursive_mutex(recursive_mutex const&);
27         recursive_mutex& operator=(recursive_mutex const&);
28     public:
29         recursive_mutex()
30         {
31             ::boost::detail::basic_recursive_mutex::initialize();
32         }
33         ~recursive_mutex()
34         {
35             ::boost::detail::basic_recursive_mutex::destroy();
36         }
37
38         typedef unique_lock<recursive_mutex> scoped_lock;
39         typedef detail::try_lock_wrapper<recursive_mutex> scoped_try_lock;
40     };
41
42     typedef recursive_mutex recursive_try_mutex;
43
44     class recursive_timed_mutex:
45         public ::boost::detail::basic_recursive_timed_mutex
46     {
47     private:
48         recursive_timed_mutex(recursive_timed_mutex const&);
49         recursive_timed_mutex& operator=(recursive_timed_mutex const&);
50     public:
51         recursive_timed_mutex()
52         {
53             ::boost::detail::basic_recursive_timed_mutex::initialize();
54         }
55         ~recursive_timed_mutex()
56         {
57             ::boost::detail::basic_recursive_timed_mutex::destroy();
58         }
59
60         typedef unique_lock<recursive_timed_mutex> scoped_timed_lock;
61         typedef detail::try_lock_wrapper<recursive_timed_mutex> scoped_try_lock;
62         typedef scoped_timed_lock scoped_lock;
63     };
64 }
65
66 #include <boost/config/abi_suffix.hpp>
67
68 #endif