]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/interprocess/sync/lock_options.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / interprocess / sync / lock_options.hpp
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
28 namespace boost {
29 namespace interprocess {
30
31 //!Type to indicate to a mutex lock constructor that must not lock the mutex.
32 struct defer_lock_type{};
33 //!Type to indicate to a mutex lock constructor that must try to lock the mutex.
34 struct try_to_lock_type {};
35 //!Type to indicate to a mutex lock constructor that the mutex is already locked.
36 struct accept_ownership_type{};
37
38 //!An object indicating that the locking
39 //!must be deferred.
40 static const defer_lock_type defer_lock = defer_lock_type();
41
42 //!An object indicating that a try_lock()
43 //!operation must be executed.
44 static const try_to_lock_type try_to_lock = try_to_lock_type();
45
46 //!An object indicating that the ownership of lockable
47 //!object must be accepted by the new owner.
48 static const accept_ownership_type accept_ownership = accept_ownership_type();
49
50 } // namespace interprocess {
51 } // namespace boost{
52
53 #include <boost/interprocess/detail/config_end.hpp>
54
55 #endif // BOOST_INTERPROCESS_LOCK_OPTIONS_HPP