summaryrefslogtreecommitdiff
path: root/boost/interprocess/sync/named_semaphore.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/interprocess/sync/named_semaphore.hpp')
-rw-r--r--boost/interprocess/sync/named_semaphore.hpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/boost/interprocess/sync/named_semaphore.hpp b/boost/interprocess/sync/named_semaphore.hpp
index 39c9096fb6..c4a421ec2b 100644
--- a/boost/interprocess/sync/named_semaphore.hpp
+++ b/boost/interprocess/sync/named_semaphore.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_SEMAPHORE_HPP
#define BOOST_INTERPROCESS_NAMED_SEMAPHORE_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -44,13 +44,13 @@ namespace interprocess {
//!acknowledgment mechanisms.
class named_semaphore
{
- /// @cond
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
//Non-copyable
named_semaphore();
named_semaphore(const named_semaphore &);
named_semaphore &operator=(const named_semaphore &);
- /// @endcond
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
public:
//!Creates a global semaphore with a name, and an initial count.
@@ -104,7 +104,7 @@ class named_semaphore
//!Returns false on error. Never throws.
static bool remove(const char *name);
- /// @cond
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
private:
friend class ipcdetail::interprocess_tester;
void dont_close_on_destruction();
@@ -118,10 +118,10 @@ class named_semaphore
typedef ipcdetail::shm_named_semaphore impl_t;
#endif
impl_t m_sem;
- /// @endcond
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
};
-/// @cond
+#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
inline named_semaphore::named_semaphore
(create_only_t, const char *name, unsigned int initialCount, const permissions &perm)
@@ -153,18 +153,12 @@ inline bool named_semaphore::try_wait()
{ return m_sem.try_wait(); }
inline bool named_semaphore::timed_wait(const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->wait();
- return true;
- }
- return m_sem.timed_wait(abs_time);
-}
+{ return m_sem.timed_wait(abs_time); }
inline bool named_semaphore::remove(const char *name)
{ return impl_t::remove(name); }
-/// @endcond
+#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
} //namespace interprocess {
} //namespace boost {