Chris@16
|
1 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 //
|
Chris@16
|
3 // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
|
Chris@16
|
4 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 //
|
Chris@16
|
7 // See http://www.boost.org/libs/interprocess for documentation.
|
Chris@16
|
8 //
|
Chris@16
|
9 //////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
10
|
Chris@16
|
11 #ifndef BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
|
Chris@16
|
12 #define BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
|
Chris@16
|
13
|
Chris@16
|
14 #if (defined _MSC_VER) && (_MSC_VER >= 1200)
|
Chris@16
|
15 # pragma once
|
Chris@16
|
16 #endif
|
Chris@16
|
17
|
Chris@16
|
18 #include <boost/interprocess/detail/config_begin.hpp>
|
Chris@16
|
19 #include <boost/interprocess/detail/workaround.hpp>
|
Chris@16
|
20
|
Chris@16
|
21 //!\file
|
Chris@16
|
22 //!Describes the lock options with associated with interprocess_mutex lock constructors.
|
Chris@16
|
23
|
Chris@16
|
24 namespace boost {
|
Chris@16
|
25
|
Chris@16
|
26 namespace posix_time
|
Chris@16
|
27 { class ptime; }
|
Chris@16
|
28
|
Chris@16
|
29 namespace interprocess {
|
Chris@16
|
30
|
Chris@16
|
31 //!Type to indicate to a mutex lock constructor that must not lock the mutex.
|
Chris@16
|
32 struct defer_lock_type{};
|
Chris@16
|
33 //!Type to indicate to a mutex lock constructor that must try to lock the mutex.
|
Chris@16
|
34 struct try_to_lock_type {};
|
Chris@16
|
35 //!Type to indicate to a mutex lock constructor that the mutex is already locked.
|
Chris@16
|
36 struct accept_ownership_type{};
|
Chris@16
|
37
|
Chris@16
|
38 //!An object indicating that the locking
|
Chris@16
|
39 //!must be deferred.
|
Chris@16
|
40 static const defer_lock_type defer_lock = defer_lock_type();
|
Chris@16
|
41
|
Chris@16
|
42 //!An object indicating that a try_lock()
|
Chris@16
|
43 //!operation must be executed.
|
Chris@16
|
44 static const try_to_lock_type try_to_lock = try_to_lock_type();
|
Chris@16
|
45
|
Chris@16
|
46 //!An object indicating that the ownership of lockable
|
Chris@16
|
47 //!object must be accepted by the new owner.
|
Chris@16
|
48 static const accept_ownership_type accept_ownership = accept_ownership_type();
|
Chris@16
|
49
|
Chris@16
|
50 } // namespace interprocess {
|
Chris@16
|
51 } // namespace boost{
|
Chris@16
|
52
|
Chris@16
|
53 #include <boost/interprocess/detail/config_end.hpp>
|
Chris@16
|
54
|
Chris@16
|
55 #endif // BOOST_INTERPROCESS_LOCK_OPTIONS_HPP
|