Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:32

0001  //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/interprocess for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 #ifndef BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
0011 #define BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
0012 
0013 #ifndef BOOST_CONFIG_HPP
0014 #  include <boost/config.hpp>
0015 #endif
0016 #
0017 #if defined(BOOST_HAS_PRAGMA_ONCE)
0018 #  pragma once
0019 #endif
0020 
0021 #include <boost/interprocess/detail/config_begin.hpp>
0022 #include <boost/interprocess/detail/workaround.hpp>
0023 #include <boost/interprocess/sync/windows/named_mutex.hpp>
0024 
0025 namespace boost {
0026 namespace interprocess {
0027 namespace ipcdetail {
0028 
0029 
0030 class winapi_named_recursive_mutex
0031    //Windows mutexes based on CreateMutex are already recursive...
0032    : public winapi_named_mutex
0033 {
0034    #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
0035 
0036    //Non-copyable
0037    winapi_named_recursive_mutex();
0038    winapi_named_recursive_mutex(const winapi_named_mutex &);
0039    winapi_named_recursive_mutex &operator=(const winapi_named_mutex &);
0040    #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
0041 
0042    public:
0043    winapi_named_recursive_mutex(create_only_t, const char *name, const permissions &perm = permissions())
0044       : winapi_named_mutex(create_only_t(), name, perm)
0045    {}
0046 
0047    winapi_named_recursive_mutex(open_or_create_t, const char *name, const permissions &perm = permissions())
0048       : winapi_named_mutex(open_or_create_t(), name, perm)
0049    {}
0050 
0051    winapi_named_recursive_mutex(open_only_t, const char *name)
0052       : winapi_named_mutex(open_only_t(), name)
0053    {}
0054 
0055    winapi_named_recursive_mutex(create_only_t, const wchar_t *name, const permissions &perm = permissions())
0056       : winapi_named_mutex(create_only_t(), name, perm)
0057    {}
0058 
0059    winapi_named_recursive_mutex(open_or_create_t, const wchar_t *name, const permissions &perm = permissions())
0060       : winapi_named_mutex(open_or_create_t(), name, perm)
0061    {}
0062 
0063    winapi_named_recursive_mutex(open_only_t, const wchar_t *name)
0064       : winapi_named_mutex(open_only_t(), name)
0065    {}
0066 };
0067 
0068 }  //namespace ipcdetail {
0069 }  //namespace interprocess {
0070 }  //namespace boost {
0071 
0072 #include <boost/interprocess/detail/config_end.hpp>
0073 
0074 #endif   //BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP