1 //////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2011-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)
7 // See http://www.boost.org/libs/interprocess for documentation.
9 //////////////////////////////////////////////////////////////////////////////
10 #ifndef BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
11 #define BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
13 #ifndef BOOST_CONFIG_HPP
14 # include <boost/config.hpp>
17 #if defined(BOOST_HAS_PRAGMA_ONCE)
21 #include <boost/interprocess/detail/config_begin.hpp>
22 #include <boost/interprocess/detail/workaround.hpp>
23 #include <boost/interprocess/sync/windows/named_mutex.hpp>
26 namespace interprocess {
30 class windows_named_recursive_mutex
31 //Windows mutexes based on CreateMutex are already recursive...
32 : public windows_named_mutex
34 #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
37 windows_named_recursive_mutex();
38 windows_named_recursive_mutex(const windows_named_mutex &);
39 windows_named_recursive_mutex &operator=(const windows_named_mutex &);
40 #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
43 windows_named_recursive_mutex(create_only_t, const char *name, const permissions &perm = permissions())
44 : windows_named_mutex(create_only_t(), name, perm)
47 windows_named_recursive_mutex(open_or_create_t, const char *name, const permissions &perm = permissions())
48 : windows_named_mutex(open_or_create_t(), name, perm)
51 windows_named_recursive_mutex(open_only_t, const char *name)
52 : windows_named_mutex(open_only_t(), name)
56 } //namespace ipcdetail {
57 } //namespace interprocess {
60 #include <boost/interprocess/detail/config_end.hpp>
62 #endif //BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP