diff options
Diffstat (limited to 'boost/interprocess/sync/named_recursive_mutex.hpp')
-rw-r--r-- | boost/interprocess/sync/named_recursive_mutex.hpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/boost/interprocess/sync/named_recursive_mutex.hpp b/boost/interprocess/sync/named_recursive_mutex.hpp index 2d4b9b2416..f1f629dfcb 100644 --- a/boost/interprocess/sync/named_recursive_mutex.hpp +++ b/boost/interprocess/sync/named_recursive_mutex.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -11,7 +11,7 @@ #ifndef BOOST_INTERPROCESS_NAMED_RECURSIVE_MUTEX_HPP #define BOOST_INTERPROCESS_NAMED_RECURSIVE_MUTEX_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -33,21 +33,21 @@ namespace boost { namespace interprocess { -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) namespace ipcdetail{ class interprocess_tester; } -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED //!A recursive mutex with a global name, so it can be found from different //!processes. This mutex can't be placed in shared memory, and //!each process should have it's own named_recursive_mutex. class named_recursive_mutex { - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) //Non-copyable named_recursive_mutex(); named_recursive_mutex(const named_recursive_mutex &); named_recursive_mutex &operator=(const named_recursive_mutex &); - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED public: //!Creates a global recursive_mutex with a name. @@ -97,7 +97,7 @@ class named_recursive_mutex //!from the system static bool remove(const char *name); - /// @cond + #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) private: friend class ipcdetail::interprocess_tester; void dont_close_on_destruction(); @@ -110,10 +110,10 @@ class named_recursive_mutex #endif impl_t m_mut; - /// @endcond + #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED }; -/// @cond +#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) inline named_recursive_mutex::~named_recursive_mutex() {} @@ -143,18 +143,12 @@ inline bool named_recursive_mutex::try_lock() { return m_mut.try_lock(); } inline bool named_recursive_mutex::timed_lock(const boost::posix_time::ptime &abs_time) -{ - if(abs_time == boost::posix_time::pos_infin){ - this->lock(); - return true; - } - return m_mut.timed_lock(abs_time); -} +{ return m_mut.timed_lock(abs_time); } inline bool named_recursive_mutex::remove(const char *name) { return impl_t::remove(name); } -/// @endcond +#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED } //namespace interprocess { } //namespace boost { |