Files
externals/linux/include/ActivBoost/interprocess/sync/windows/named_recursive_mutex.hpp
T
2023-12-15 13:15:08 -05:00

75 lines
2.5 KiB
C++

//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef ACTIV_BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
#define ACTIV_BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP
#ifndef ACTIV_BOOST_CONFIG_HPP
# include <ActivBoost/config.hpp>
#endif
#
#if defined(ACTIV_BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <ActivBoost/interprocess/detail/config_begin.hpp>
#include <ActivBoost/interprocess/detail/workaround.hpp>
#include <ActivBoost/interprocess/sync/windows/named_mutex.hpp>
namespace Boost {
namespace interprocess {
namespace ipcdetail {
class winapi_named_recursive_mutex
//Windows mutexes based on CreateMutex are already recursive...
: public winapi_named_mutex
{
#if !defined(ACTIV_BOOST_INTERPROCESS_DOXYGEN_INVOKED)
//Non-copyable
winapi_named_recursive_mutex();
winapi_named_recursive_mutex(const winapi_named_mutex &);
winapi_named_recursive_mutex &operator=(const winapi_named_mutex &);
#endif //#ifndef ACTIV_BOOST_INTERPROCESS_DOXYGEN_INVOKED
public:
winapi_named_recursive_mutex(create_only_t, const char *name, const permissions &perm = permissions())
: winapi_named_mutex(create_only_t(), name, perm)
{}
winapi_named_recursive_mutex(open_or_create_t, const char *name, const permissions &perm = permissions())
: winapi_named_mutex(open_or_create_t(), name, perm)
{}
winapi_named_recursive_mutex(open_only_t, const char *name)
: winapi_named_mutex(open_only_t(), name)
{}
winapi_named_recursive_mutex(create_only_t, const wchar_t *name, const permissions &perm = permissions())
: winapi_named_mutex(create_only_t(), name, perm)
{}
winapi_named_recursive_mutex(open_or_create_t, const wchar_t *name, const permissions &perm = permissions())
: winapi_named_mutex(open_or_create_t(), name, perm)
{}
winapi_named_recursive_mutex(open_only_t, const wchar_t *name)
: winapi_named_mutex(open_only_t(), name)
{}
};
} //namespace ipcdetail {
} //namespace interprocess {
} //namespace Boost {
#include <ActivBoost/interprocess/detail/config_end.hpp>
#endif //ACTIV_BOOST_INTERPROCESS_WINDOWS_RECURSIVE_NAMED_MUTEX_HPP