Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: // Chris@16: // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/interprocess for documentation. Chris@16: // Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: #ifndef BOOST_INTERPROCESS_LOCK_OPTIONS_HPP Chris@16: #define BOOST_INTERPROCESS_LOCK_OPTIONS_HPP Chris@16: Chris@101: #ifndef BOOST_CONFIG_HPP Chris@101: # include Chris@101: #endif Chris@101: # Chris@101: #if defined(BOOST_HAS_PRAGMA_ONCE) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: //!\file Chris@16: //!Describes the lock options with associated with interprocess_mutex lock constructors. Chris@16: Chris@16: namespace boost { Chris@16: Chris@101: #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) Chris@101: Chris@16: namespace posix_time Chris@16: { class ptime; } Chris@16: Chris@101: #endif //#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) Chris@101: Chris@16: namespace interprocess { Chris@16: Chris@16: //!Type to indicate to a mutex lock constructor that must not lock the mutex. Chris@16: struct defer_lock_type{}; Chris@16: //!Type to indicate to a mutex lock constructor that must try to lock the mutex. Chris@16: struct try_to_lock_type {}; Chris@16: //!Type to indicate to a mutex lock constructor that the mutex is already locked. Chris@16: struct accept_ownership_type{}; Chris@16: Chris@16: //!An object indicating that the locking Chris@16: //!must be deferred. Chris@16: static const defer_lock_type defer_lock = defer_lock_type(); Chris@16: Chris@16: //!An object indicating that a try_lock() Chris@16: //!operation must be executed. Chris@16: static const try_to_lock_type try_to_lock = try_to_lock_type(); Chris@16: Chris@16: //!An object indicating that the ownership of lockable Chris@16: //!object must be accepted by the new owner. Chris@16: static const accept_ownership_type accept_ownership = accept_ownership_type(); Chris@16: Chris@16: } // namespace interprocess { Chris@16: } // namespace boost{ Chris@16: Chris@16: #include Chris@16: Chris@16: #endif // BOOST_INTERPROCESS_LOCK_OPTIONS_HPP