PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/interprocess/sync/lock_options.hpp

http://hadesmem.googlecode.com/
C++ Header | 55 lines | 21 code | 14 blank | 20 comment | 1 complexity | 4322f16dfe5125a740fe6826a0848a17 MD5 | raw file
 1//////////////////////////////////////////////////////////////////////////////
 2//
 3// (C) Copyright Ion Gaztanaga 2005-2009. 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#if (defined _MSC_VER) && (_MSC_VER >= 1200)
15#  pragma once
16#endif
17
18#include <boost/interprocess/detail/config_begin.hpp>
19#include <boost/interprocess/detail/workaround.hpp>
20
21//!\file
22//!Describes the lock options with associated with interprocess_mutex lock constructors.
23
24namespace boost {
25
26namespace posix_time
27{  class ptime;   }
28
29namespace interprocess {
30
31//!Type to indicate to a mutex lock constructor that must not lock the mutex.
32struct defer_lock_type{};
33//!Type to indicate to a mutex lock constructor that must try to lock the mutex.
34struct try_to_lock_type {};
35//!Type to indicate to a mutex lock constructor that the mutex is already locked.
36struct accept_ownership_type{};
37
38//!An object indicating that the locking
39//!must be deferred.
40static const defer_lock_type      defer_lock      = defer_lock_type();
41
42//!An object indicating that a try_lock()
43//!operation must be executed.
44static 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.
48static 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