]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/interprocess/include/boost/interprocess/sync/lock_options.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / interprocess / include / boost / interprocess / sync / lock_options.hpp
CommitLineData
7c673cae
FG
1//////////////////////////////////////////////////////////////////////////////
2//
3// (C) Copyright Ion Gaztanaga 2005-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#ifndef BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
12#define BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
13
14#ifndef BOOST_CONFIG_HPP
15# include <boost/config.hpp>
16#endif
17#
18#if defined(BOOST_HAS_PRAGMA_ONCE)
19# pragma once
20#endif
21
22#include <boost/interprocess/detail/config_begin.hpp>
23#include <boost/interprocess/detail/workaround.hpp>
24
25//!\file
26//!Describes the lock options with associated with interprocess_mutex lock constructors.
27
28namespace boost {
29
30#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
31
32namespace posix_time
33{ class ptime; }
34
35#endif //#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
36
37namespace interprocess {
38
39//!Type to indicate to a mutex lock constructor that must not lock the mutex.
40struct defer_lock_type{};
41//!Type to indicate to a mutex lock constructor that must try to lock the mutex.
42struct try_to_lock_type {};
43//!Type to indicate to a mutex lock constructor that the mutex is already locked.
44struct accept_ownership_type{};
45
46//!An object indicating that the locking
47//!must be deferred.
48static const defer_lock_type defer_lock = defer_lock_type();
49
50//!An object indicating that a try_lock()
51//!operation must be executed.
52static const try_to_lock_type try_to_lock = try_to_lock_type();
53
54//!An object indicating that the ownership of lockable
55//!object must be accepted by the new owner.
56static const accept_ownership_type accept_ownership = accept_ownership_type();
57
58} // namespace interprocess {
59} // namespace boost{
60
61#include <boost/interprocess/detail/config_end.hpp>
62
63#endif // BOOST_INTERPROCESS_LOCK_OPTIONS_HPP