Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76189 - in branches/release/boost/interprocess: . streams sync sync/posix sync/shm sync/spin sync/windows sync/xsi
From: igaztanaga_at_[hidden]
Date: 2011-12-26 12:42:25


Author: igaztanaga
Date: 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
New Revision: 76189
URL: http://svn.boost.org/trac/boost/changeset/76189

Log:
Changes for 1.49
Added:
   branches/release/boost/interprocess/sync/posix/condition.hpp
      - copied unchanged from r76181, /trunk/boost/interprocess/sync/posix/condition.hpp
   branches/release/boost/interprocess/sync/posix/mutex.hpp
      - copied unchanged from r76181, /trunk/boost/interprocess/sync/posix/mutex.hpp
   branches/release/boost/interprocess/sync/posix/named_mutex.hpp
      - copied unchanged from r76181, /trunk/boost/interprocess/sync/posix/named_mutex.hpp
   branches/release/boost/interprocess/sync/posix/named_semaphore.hpp
      - copied unchanged from r76181, /trunk/boost/interprocess/sync/posix/named_semaphore.hpp
   branches/release/boost/interprocess/sync/posix/recursive_mutex.hpp
      - copied unchanged from r76181, /trunk/boost/interprocess/sync/posix/recursive_mutex.hpp
   branches/release/boost/interprocess/sync/posix/semaphore.hpp
      - copied unchanged from r76181, /trunk/boost/interprocess/sync/posix/semaphore.hpp
   branches/release/boost/interprocess/sync/shm/
      - copied from r76181, /trunk/boost/interprocess/sync/shm/
   branches/release/boost/interprocess/sync/spin/
      - copied from r76181, /trunk/boost/interprocess/sync/spin/
   branches/release/boost/interprocess/sync/windows/
      - copied from r76181, /trunk/boost/interprocess/sync/windows/
Removed:
   branches/release/boost/interprocess/sync/posix/interprocess_barrier.hpp
   branches/release/boost/interprocess/sync/posix/interprocess_condition.hpp
   branches/release/boost/interprocess/sync/posix/interprocess_mutex.hpp
   branches/release/boost/interprocess/sync/posix/interprocess_semaphore.hpp
Properties modified:
   branches/release/boost/interprocess/ (props changed)
Text files modified:
   branches/release/boost/interprocess/managed_external_buffer.hpp | 11 ++
   branches/release/boost/interprocess/streams/bufferstream.hpp | 2
   branches/release/boost/interprocess/streams/vectorstream.hpp | 2
   branches/release/boost/interprocess/sync/file_lock.hpp | 6
   branches/release/boost/interprocess/sync/interprocess_condition.hpp | 71 ++++++++----------
   branches/release/boost/interprocess/sync/interprocess_semaphore.hpp | 70 ++++++++++++-----
   branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp | 3
   branches/release/boost/interprocess/sync/named_semaphore.hpp | 94 ++---------------------
   branches/release/boost/interprocess/sync/posix/pthread_helpers.hpp | 2
   branches/release/boost/interprocess/sync/posix/ptime_to_timespec.hpp | 2
   branches/release/boost/interprocess/sync/posix/semaphore_wrapper.hpp | 156 +++++++++++++--------------------------
   branches/release/boost/interprocess/sync/scoped_lock.hpp | 8 +-
   branches/release/boost/interprocess/sync/upgradable_lock.hpp | 8 +-
   branches/release/boost/interprocess/sync/xsi/xsi_named_mutex.hpp | 4
   14 files changed, 168 insertions(+), 271 deletions(-)

Modified: branches/release/boost/interprocess/managed_external_buffer.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_external_buffer.hpp (original)
+++ branches/release/boost/interprocess/managed_external_buffer.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -19,8 +19,13 @@
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/detail/managed_memory_impl.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/assert.hpp>
+//These includes needed to fulfill default template parameters of
+//predeclarations in interprocess_fwd.hpp
+#include <boost/interprocess/mem_algo/rbtree_best_fit.hpp>
+#include <boost/interprocess/sync/mutex_family.hpp>
+#include <boost/interprocess/indexes/iset_index.hpp>
 
 //!\file
 //!Describes a named user memory allocation user class.
@@ -85,7 +90,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    basic_managed_external_buffer &operator=(BOOST_RV_REF(basic_managed_external_buffer) moved)
    {
- basic_managed_external_buffer tmp(boost::interprocess::move(moved));
+ basic_managed_external_buffer tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/streams/bufferstream.hpp
==============================================================================
--- branches/release/boost/interprocess/streams/bufferstream.hpp (original)
+++ branches/release/boost/interprocess/streams/bufferstream.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/streams/vectorstream.hpp
==============================================================================
--- branches/release/boost/interprocess/streams/vectorstream.hpp (original)
+++ branches/release/boost/interprocess/streams/vectorstream.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/sync/file_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/file_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/file_lock.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -21,7 +21,7 @@
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <boost/interprocess/detail/os_thread_functions.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 
 //!\file
 //!Describes a class that wraps file locking capabilities.
@@ -65,7 +65,7 @@
    //!Does not throw
    file_lock &operator=(BOOST_RV_REF(file_lock) moved)
    {
- file_lock tmp(boost::interprocess::move(moved));
+ file_lock tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/sync/interprocess_condition.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_condition.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_condition.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -21,22 +21,20 @@
 #include <boost/interprocess/detail/workaround.hpp>
 
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/sync/scoped_lock.hpp>
-#include <boost/interprocess/sync/interprocess_condition.hpp>
 #include <boost/interprocess/sync/interprocess_mutex.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/limits.hpp>
 #include <boost/assert.hpp>
 
 #if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED)
- #include <pthread.h>
- #include <errno.h>
- #include <boost/interprocess/sync/posix/pthread_helpers.hpp>
+ #include <boost/interprocess/sync/posix/condition.hpp>
    #define BOOST_INTERPROCESS_USE_POSIX
+//Experimental...
+//#elif !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_WINDOWS)
+// #include <boost/interprocess/sync/windows/condition.hpp>
+// #define BOOST_INTERPROCESS_USE_WINDOWS
 #else
- #include <boost/interprocess/detail/atomic.hpp>
- #include <boost/cstdint.hpp>
- #include <boost/interprocess/detail/os_thread_functions.hpp>
+ #include <boost/interprocess/sync/spin/condition.hpp>
    #define BOOST_INTERPROCESS_USE_GENERIC_EMULATION
 #endif
 
@@ -66,19 +64,21 @@
    /// @endcond
    public:
    //!Constructs a interprocess_condition. On error throws interprocess_exception.
- interprocess_condition();
+ interprocess_condition(){}
 
    //!Destroys *this
    //!liberating system resources.
- ~interprocess_condition();
+ ~interprocess_condition(){}
 
    //!If there is a thread waiting on *this, change that
    //!thread's state to ready. Otherwise there is no effect.
- void notify_one();
+ void notify_one()
+ { m_condition.notify_one(); }
 
    //!Change the state of all threads waiting on *this to ready.
    //!If there are no waiting threads, notify_all() has no effect.
- void notify_all();
+ void notify_all()
+ { m_condition.notify_all(); }
 
    //!Releases the lock on the interprocess_mutex object associated with lock, blocks
    //!the current thread of execution until readied by a call to
@@ -88,7 +88,7 @@
    {
       if (!lock)
          throw lock_exception();
- do_wait(*lock.mutex());
+ this->do_wait(*lock.mutex());
    }
 
    //!The same as:
@@ -100,7 +100,7 @@
          throw lock_exception();
 
       while (!pred())
- do_wait(*lock.mutex());
+ this->do_wait(*lock.mutex());
    }
 
    //!Releases the lock on the interprocess_mutex object associated with lock, blocks
@@ -117,7 +117,7 @@
       }
       if (!lock)
             throw lock_exception();
- return do_timed_wait(abs_time, *lock.mutex());
+ return this->do_timed_wait(abs_time, *lock.mutex());
    }
 
    //!The same as: while (!pred()) {
@@ -133,7 +133,7 @@
       if (!lock)
             throw lock_exception();
       while (!pred()){
- if (!do_timed_wait(abs_time, *lock.mutex()))
+ if (!this->do_timed_wait(abs_time, *lock.mutex()))
             return pred();
       }
 
@@ -141,39 +141,32 @@
    }
 
    /// @cond
- private:
- void do_wait(interprocess_mutex &mut);
 
- bool do_timed_wait(const boost::posix_time::ptime &abs_time, interprocess_mutex &mut);
+ void do_wait(interprocess_mutex &mut)
+ { m_condition.do_wait(mut.mutex); }
+
+ bool do_timed_wait(const boost::posix_time::ptime &abs_time, interprocess_mutex &mut)
+ { return m_condition.do_timed_wait(abs_time, mut.mutex); }
 
+ private:
    #if defined (BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
- enum { SLEEP = 0, NOTIFY_ONE, NOTIFY_ALL };
- interprocess_mutex m_enter_mut;
- //interprocess_mutex m_check_mut;
- volatile boost::uint32_t m_command;
- volatile boost::uint32_t m_num_waiters;
- bool do_timed_wait(bool tout_enabled, const boost::posix_time::ptime &abs_time, interprocess_mutex &mut);
- void notify(boost::uint32_t command);
+ #undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
+ ipcdetail::spin_condition m_condition;
    #elif defined(BOOST_INTERPROCESS_USE_POSIX)
- pthread_cond_t m_condition;
+ #undef BOOST_INTERPROCESS_USE_POSIX
+ ipcdetail::posix_condition m_condition;
+ #elif defined(BOOST_INTERPROCESS_USE_WINDOWS)
+ #undef BOOST_INTERPROCESS_USE_WINDOWS
+ ipcdetail::windows_condition m_condition;
+ #else
+ #error "Unknown platform for interprocess_mutex"
    #endif
    /// @endcond
 };
 
 } //namespace interprocess
-
 } // namespace boost
 
-#ifdef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# include <boost/interprocess/sync/emulation/interprocess_condition.hpp>
-#endif
-
-#ifdef BOOST_INTERPROCESS_USE_POSIX
-# undef BOOST_INTERPROCESS_USE_POSIX
-# include <boost/interprocess/sync/posix/interprocess_condition.hpp>
-#endif
-
 #include <boost/interprocess/detail/config_end.hpp>
 
 #endif // BOOST_INTERPROCESS_CONDITION_HPP

Modified: branches/release/boost/interprocess/sync/interprocess_semaphore.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_semaphore.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_semaphore.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -19,23 +19,21 @@
 
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
+
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 
 #if !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && \
    (defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED) && defined(BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES))
- #include <fcntl.h> //O_CREAT, O_*...
- #include <unistd.h> //close
- #include <string> //std::string
- #include <semaphore.h> //sem_* family, SEM_VALUE_MAX
- #include <sys/stat.h> //mode_t, S_IRWXG, S_IRWXO, S_IRWXU,
- #include <boost/interprocess/sync/posix/semaphore_wrapper.hpp>
+ #include <boost/interprocess/sync/posix/semaphore.hpp>
    #define BOOST_INTERPROCESS_USE_POSIX
+//Experimental...
+//#elif !defined(BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION) && defined (BOOST_INTERPROCESS_WINDOWS)
+// #include <boost/interprocess/sync/windows/semaphore.hpp>
+// #define BOOST_INTERPROCESS_USE_WINDOWS
 #else
- #include <boost/interprocess/detail/atomic.hpp>
- #include <boost/cstdint.hpp>
- #include <boost/interprocess/detail/os_thread_functions.hpp>
+ #include <boost/interprocess/sync/spin/semaphore.hpp>
    #define BOOST_INTERPROCESS_USE_GENERIC_EMULATION
 #endif
 
@@ -45,7 +43,6 @@
 //!Describes a interprocess_semaphore class for inter-process synchronization
 
 namespace boost {
-
 namespace interprocess {
 
 //!Wraps a interprocess_semaphore that can be placed in shared memory and can be
@@ -93,26 +90,55 @@
    /// @cond
    private:
    #if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
- volatile boost::uint32_t m_count;
+ #undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
+ ipcdetail::spin_semaphore m_sem;
+ #elif defined(BOOST_INTERPROCESS_USE_WINDOWS)
+ #undef BOOST_INTERPROCESS_USE_WINDOWS
+ ipcdetail::windows_semaphore m_sem;
    #else
- ipcdetail::semaphore_wrapper m_sem;
+ #undef BOOST_INTERPROCESS_USE_POSIX
+ ipcdetail::posix_semaphore m_sem;
    #endif //#if defined(BOOST_INTERPROCESS_USE_GENERIC_EMULATION)
    /// @endcond
 };
 
 } //namespace interprocess {
-
 } //namespace boost {
 
-#ifdef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# undef BOOST_INTERPROCESS_USE_GENERIC_EMULATION
-# include <boost/interprocess/sync/emulation/interprocess_semaphore.hpp>
-#endif
+namespace boost {
+namespace interprocess {
 
-#ifdef BOOST_INTERPROCESS_USE_POSIX
-# undef BOOST_INTERPROCESS_USE_POSIX
-# include <boost/interprocess/sync/posix/interprocess_semaphore.hpp>
-#endif
+inline interprocess_semaphore::interprocess_semaphore(unsigned int initialCount)
+ : m_sem(initialCount)
+{}
+
+inline interprocess_semaphore::~interprocess_semaphore(){}
+
+inline void interprocess_semaphore::wait()
+{
+ #ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
+ boost::posix_time::ptime wait_time
+ = boost::posix_time::microsec_clock::universal_time()
+ + boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
+ if (!m_sem.timed_wait(wait_time))
+ {
+ throw interprocess_exception(timeout_when_waiting_error, "Interprocess semaphore timeout when waiting. Possible deadlock: owner died without posting?");
+ }
+ #else
+ m_sem.wait();
+ #endif
+}
+inline bool interprocess_semaphore::try_wait()
+{ return m_sem.try_wait(); }
+
+inline bool interprocess_semaphore::timed_wait(const boost::posix_time::ptime &abs_time)
+{ return m_sem.timed_wait(abs_time); }
+
+inline void interprocess_semaphore::post()
+{ m_sem.post(); }
+
+} //namespace interprocess {
+} //namespace boost {
 
 #include <boost/interprocess/detail/config_end.hpp>
 

Modified: branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -18,6 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/sync/scoped_lock.hpp>
+#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 #include <boost/interprocess/sync/interprocess_mutex.hpp>
 #include <boost/interprocess/sync/interprocess_condition.hpp>
 #include <climits>

Modified: branches/release/boost/interprocess/sync/named_semaphore.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_semaphore.hpp (original)
+++ branches/release/boost/interprocess/sync/named_semaphore.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
  //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -24,12 +24,9 @@
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 
 #if defined(BOOST_INTERPROCESS_NAMED_SEMAPHORE_USES_POSIX_SEMAPHORES)
-#include <boost/interprocess/sync/posix/semaphore_wrapper.hpp>
+#include <boost/interprocess/sync/posix/named_semaphore.hpp>
 #else
-#include <boost/interprocess/shared_memory_object.hpp>
-#include <boost/interprocess/detail/managed_open_or_create_impl.hpp>
-#include <boost/interprocess/sync/interprocess_semaphore.hpp>
-#include <boost/interprocess/sync/emulation/named_creation_functor.hpp>
+#include <boost/interprocess/sync/shm/named_semaphore.hpp>
 #endif
 
 //!\file
@@ -109,33 +106,28 @@
    void dont_close_on_destruction();
 
    #if defined(BOOST_INTERPROCESS_NAMED_SEMAPHORE_USES_POSIX_SEMAPHORES)
- ipcdetail::named_semaphore_wrapper m_sem;
+ typedef ipcdetail::posix_named_semaphore impl_t;
    #else
- interprocess_semaphore *semaphore() const
- { return static_cast<interprocess_semaphore*>(m_shmem.get_user_address()); }
-
- ipcdetail::managed_open_or_create_impl<shared_memory_object> m_shmem;
- typedef ipcdetail::named_creation_functor<interprocess_semaphore, int> construct_func_t;
+ typedef ipcdetail::shm_named_semaphore impl_t;
    #endif
+ impl_t m_sem;
    /// @endcond
 };
 
 /// @cond
 
-#if defined(BOOST_INTERPROCESS_NAMED_SEMAPHORE_USES_POSIX_SEMAPHORES)
-
 inline named_semaphore::named_semaphore
    (create_only_t, const char *name, unsigned int initialCount, const permissions &perm)
- : m_sem(ipcdetail::DoCreate, name, initialCount, perm)
+ : m_sem(create_only, name, initialCount, perm)
 {}
 
 inline named_semaphore::named_semaphore
    (open_or_create_t, const char *name, unsigned int initialCount, const permissions &perm)
- : m_sem(ipcdetail::DoOpenOrCreate, name, initialCount, perm)
+ : m_sem(open_or_create, name, initialCount, perm)
 {}
 
 inline named_semaphore::named_semaphore(open_only_t, const char *name)
- : m_sem(ipcdetail::DoOpen, name, 1, permissions())
+ : m_sem(open_only, name)
 {}
 
 inline named_semaphore::~named_semaphore()
@@ -163,73 +155,7 @@
 }
 
 inline bool named_semaphore::remove(const char *name)
-{ return ipcdetail::named_semaphore_wrapper::remove(name); }
-
-#else
-
-inline named_semaphore::~named_semaphore()
-{}
-
-inline void named_semaphore::dont_close_on_destruction()
-{ ipcdetail::interprocess_tester::dont_close_on_destruction(m_shmem); }
-
-inline named_semaphore::named_semaphore
- (create_only_t, const char *name, unsigned int initialCount, const permissions &perm)
- : m_shmem (create_only
- ,name
- ,sizeof(interprocess_semaphore) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoCreate, initialCount)
- ,perm)
-{}
-
-inline named_semaphore::named_semaphore
- (open_or_create_t, const char *name, unsigned int initialCount, const permissions &perm)
- : m_shmem (open_or_create
- ,name
- ,sizeof(interprocess_semaphore) +
- ipcdetail::managed_open_or_create_impl<shared_memory_object>::
- ManagedOpenOrCreateUserOffset
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpenOrCreate, initialCount)
- ,perm)
-{}
-
-inline named_semaphore::named_semaphore
- (open_only_t, const char *name)
- : m_shmem (open_only
- ,name
- ,read_write
- ,0
- ,construct_func_t(ipcdetail::DoOpen, 0))
-{}
-
-inline void named_semaphore::post()
-{ semaphore()->post(); }
-
-inline void named_semaphore::wait()
-{ semaphore()->wait(); }
-
-inline bool named_semaphore::try_wait()
-{ return semaphore()->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 semaphore()->timed_wait(abs_time);
-}
-
-inline bool named_semaphore::remove(const char *name)
-{ return shared_memory_object::remove(name); }
-
-#endif
+{ return impl_t::remove(name); }
 
 /// @endcond
 

Deleted: branches/release/boost/interprocess/sync/posix/interprocess_barrier.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/interprocess_barrier.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
+++ (empty file)
@@ -1,45 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006. 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)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include<boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/assert.hpp>
-
-namespace boost {
-namespace interprocess {
-
-inline barrier::barrier(unsigned int count)
-{
- if (count == 0)
- throw std::invalid_argument("count cannot be zero.");
- ipcdetail::barrierattr_wrapper barrier_attr;
- ipcdetail::barrier_initializer barrier
- (m_barrier, barrier_attr, static_cast<int>(count));
- barrier.release();
-}
-
-inline barrier::~barrier()
-{
- int res = pthread_barrier_destroy(&m_barrier);
- BOOST_ASSERT(res == 0);(void)res;
-}
-
-inline bool barrier::wait()
-{
- int res = pthread_barrier_wait(&m_barrier);
-
- if (res != PTHREAD_BARRIER_SERIAL_THREAD && res != 0){
- throw interprocess_exception(res);
- }
- return res == PTHREAD_BARRIER_SERIAL_THREAD;
-}
-
-} //namespace interprocess {
-} //namespace boost {

Deleted: branches/release/boost/interprocess/sync/posix/interprocess_condition.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/interprocess_condition.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
+++ (empty file)
@@ -1,82 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2009. 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)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/assert.hpp>
-
-namespace boost {
-
-namespace interprocess {
-
-inline interprocess_condition::interprocess_condition()
-{
- int res;
- pthread_condattr_t cond_attr;
- res = pthread_condattr_init(&cond_attr);
- if(res != 0){
- throw interprocess_exception("pthread_condattr_init failed");
- }
- res = pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED);
- if(res != 0){
- pthread_condattr_destroy(&cond_attr);
- throw interprocess_exception(res);
- }
- res = pthread_cond_init(&m_condition, &cond_attr);
- pthread_condattr_destroy(&cond_attr);
- if(res != 0){
- throw interprocess_exception(res);
- }
-}
-
-inline interprocess_condition::~interprocess_condition()
-{
- int res = 0;
- res = pthread_cond_destroy(&m_condition);
- BOOST_ASSERT(res == 0);
-}
-
-inline void interprocess_condition::notify_one()
-{
- int res = 0;
- res = pthread_cond_signal(&m_condition);
- BOOST_ASSERT(res == 0);
-}
-
-inline void interprocess_condition::notify_all()
-{
- int res = 0;
- res = pthread_cond_broadcast(&m_condition);
- BOOST_ASSERT(res == 0);
-}
-
-inline void interprocess_condition::do_wait(interprocess_mutex &mut)
-{
- pthread_mutex_t* pmutex = &mut.m_mut;
- int res = 0;
- res = pthread_cond_wait(&m_condition, pmutex);
- BOOST_ASSERT(res == 0);
-}
-
-inline bool interprocess_condition::do_timed_wait
- (const boost::posix_time::ptime &abs_time, interprocess_mutex &mut)
-{
- timespec ts = ipcdetail::ptime_to_timespec(abs_time);
- pthread_mutex_t* pmutex = &mut.m_mut;
- int res = 0;
- res = pthread_cond_timedwait(&m_condition, pmutex, &ts);
- BOOST_ASSERT(res == 0 || res == ETIMEDOUT);
-
- return res != ETIMEDOUT;
-}
-
-} //namespace interprocess
-
-} // namespace boost

Deleted: branches/release/boost/interprocess/sync/posix/interprocess_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/interprocess_mutex.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
+++ (empty file)
@@ -1,122 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2009. 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)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// Parts of the pthread code come from Boost Threads code:
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2001-2003
-// William E. Kempf
-//
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appear in all copies and
-// that both that copyright notice and this permission notice appear
-// in supporting documentation. William E. Kempf makes no representations
-// about the suitability of this software for any purpose.
-// It is provided "as is" without express or implied warranty.
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-#include <boost/interprocess/exceptions.hpp>
-#ifndef BOOST_INTERPROCESS_POSIX_TIMEOUTS
-# include <boost/interprocess/detail/os_thread_functions.hpp>
-#endif
-#include <boost/assert.hpp>
-
-namespace boost {
-namespace interprocess {
-
-inline interprocess_mutex::interprocess_mutex()
-{
- ipcdetail::mutexattr_wrapper mut_attr;
- ipcdetail::mutex_initializer mut(m_mut, mut_attr);
- mut.release();
-}
-
-inline interprocess_mutex::~interprocess_mutex()
-{
- int res = pthread_mutex_destroy(&m_mut);
- BOOST_ASSERT(res == 0);(void)res;
-}
-
-inline void interprocess_mutex::lock()
-{
-#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
- boost::posix_time::ptime wait_time
- = boost::posix_time::microsec_clock::universal_time()
- + boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
- if (!timed_lock(wait_time))
- {
- throw interprocess_exception(timeout_when_locking_error, "Interprocess mutex timeout when locking. Possible deadlock: owner died without unlocking?");
- }
-#else
- if (pthread_mutex_lock(&m_mut) != 0)
- throw lock_exception();
-#endif
-}
-
-inline bool interprocess_mutex::try_lock()
-{
- int res = pthread_mutex_trylock(&m_mut);
- if (!(res == 0 || res == EBUSY))
- throw lock_exception();
- return res == 0;
-}
-
-inline bool interprocess_mutex::timed_lock(const boost::posix_time::ptime &abs_time)
-{
- if(abs_time == boost::posix_time::pos_infin){
- this->lock();
- return true;
- }
- #ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
-
- timespec ts = ipcdetail::ptime_to_timespec(abs_time);
- int res = pthread_mutex_timedlock(&m_mut, &ts);
- if (res != 0 && res != ETIMEDOUT)
- throw lock_exception();
- return res == 0;
-
- #else //BOOST_INTERPROCESS_POSIX_TIMEOUTS
-
- //Obtain current count and target time
- boost::posix_time::ptime now = microsec_clock::universal_time();
-
- if(now >= abs_time) return false;
-
- do{
- if(this->try_lock()){
- break;
- }
- now = microsec_clock::universal_time();
-
- if(now >= abs_time){
- return false;
- }
- // relinquish current time slice
- ipcdetail::thread_yield();
- }while (true);
- return true;
-
- #endif //BOOST_INTERPROCESS_POSIX_TIMEOUTS
-}
-
-inline void interprocess_mutex::unlock()
-{
- int res = 0;
- res = pthread_mutex_unlock(&m_mut);
- BOOST_ASSERT(res == 0);
-}
-
-} //namespace interprocess {
-} //namespace boost {

Deleted: branches/release/boost/interprocess/sync/posix/interprocess_semaphore.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/interprocess_semaphore.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
+++ (empty file)
@@ -1,49 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2009. 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)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/interprocess/sync/posix/ptime_to_timespec.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-
-namespace boost {
-
-namespace interprocess {
-
-inline interprocess_semaphore::~interprocess_semaphore()
-{}
-
-inline interprocess_semaphore::interprocess_semaphore(unsigned int initialCount)
- : m_sem(initialCount)
-{}
-
-inline void interprocess_semaphore::post()
-{ m_sem.post(); }
-
-inline void interprocess_semaphore::wait()
-{ m_sem.wait(); }
-
-inline bool interprocess_semaphore::try_wait()
-{ return m_sem.try_wait(); }
-
-inline bool interprocess_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);
-}
-/*
-inline int interprocess_semaphore::get_count() const
-{ return m_sem.get_count(); }
-*/
-} //namespace interprocess {
-
-} //namespace boost {
-

Modified: branches/release/boost/interprocess/sync/posix/pthread_helpers.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/pthread_helpers.hpp (original)
+++ branches/release/boost/interprocess/sync/posix/pthread_helpers.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/sync/posix/ptime_to_timespec.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/ptime_to_timespec.hpp (original)
+++ branches/release/boost/interprocess/sync/posix/ptime_to_timespec.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //

Modified: branches/release/boost/interprocess/sync/posix/semaphore_wrapper.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/posix/semaphore_wrapper.hpp (original)
+++ branches/release/boost/interprocess/sync/posix/semaphore_wrapper.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -17,8 +17,12 @@
 #include <boost/interprocess/detail/os_file_functions.hpp>
 #include <boost/interprocess/detail/tmp_dir_helpers.hpp>
 #include <boost/interprocess/permissions.hpp>
-#include <string>
-#include <semaphore.h>
+
+#include <fcntl.h> //O_CREAT, O_*...
+#include <unistd.h> //close
+#include <string> //std::string
+#include <semaphore.h> //sem_* family, SEM_VALUE_MAX
+#include <sys/stat.h> //mode_t, S_IRWXG, S_IRWXO, S_IRWXU,
 #include <boost/assert.hpp>
 
 #ifdef SEM_FAILED
@@ -35,49 +39,59 @@
 
 namespace boost {
 namespace interprocess {
-
-/// @cond
-namespace ipcdetail{ class interprocess_tester; }
-/// @endcond
-
 namespace ipcdetail {
 
 inline bool semaphore_open
- (sem_t *&handle, ipcdetail::create_enum_t type, const char *origname,
- unsigned int count, const permissions &perm = permissions())
+ (sem_t *&handle, create_enum_t type, const char *origname,
+ unsigned int count = 0, const permissions &perm = permissions())
 {
    std::string name;
    #ifndef BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SEMAPHORES
- ipcdetail::add_leading_slash(origname, name);
+ add_leading_slash(origname, name);
    #else
- ipcdetail::create_tmp_and_clean_old_and_get_filename(origname, name);
+ create_tmp_and_clean_old_and_get_filename(origname, name);
    #endif
 
    //Create new mapping
    int oflag = 0;
    switch(type){
- case ipcdetail::DoOpen:
+ case DoOpen:
+ {
          //No addition
+ handle = ::sem_open(name.c_str(), oflag);
+ }
       break;
- case ipcdetail::DoCreate:
- oflag |= (O_CREAT | O_EXCL);
- break;
- case ipcdetail::DoOpenOrCreate:
- oflag |= O_CREAT;
+ case DoOpenOrCreate:
+ case DoCreate:
+ {
+ while(1){
+ oflag = (O_CREAT | O_EXCL);
+ handle = ::sem_open(name.c_str(), oflag, perm.get_permissions(), count);
+ if(handle != BOOST_INTERPROCESS_POSIX_SEM_FAILED){
+ //We can't change semaphore permissions!
+ //::fchmod(handle, perm.get_permissions());
+ break;
+ }
+ else if(errno == EEXIST && type == DoOpenOrCreate){
+ oflag = 0;
+ if( (handle = ::sem_open(name.c_str(), oflag)) != BOOST_INTERPROCESS_POSIX_SEM_FAILED
+ || (errno != ENOENT) ){
+ break;
+ }
+ }
+ else{
+ break;
+ }
+ }
+ }
       break;
       default:
- {
- error_info err = other_error;
- throw interprocess_exception(err);
- }
+ {
+ error_info err(other_error);
+ throw interprocess_exception(err);
+ }
    }
 
- //Open file using POSIX API
- if(oflag & O_CREAT)
- handle = sem_open(name.c_str(), oflag, perm.get_permissions(), count);
- else
- handle = sem_open(name.c_str(), oflag);
-
    //Check for error
    if(handle == BOOST_INTERPROCESS_POSIX_SEM_FAILED){
       throw interprocess_exception(error_info(errno));
@@ -99,9 +113,9 @@
    try{
       std::string sem_str;
       #ifndef BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SEMAPHORES
- ipcdetail::add_leading_slash(semname, sem_str);
+ add_leading_slash(semname, sem_str);
       #else
- ipcdetail::tmp_filename(semname, sem_str);
+ tmp_filename(semname, sem_str);
       #endif
       return 0 == sem_unlink(sem_str.c_str());
    }
@@ -159,8 +173,12 @@
 
 inline bool semaphore_timed_wait(sem_t *handle, const boost::posix_time::ptime &abs_time)
 {
+ if(abs_time == boost::posix_time::pos_infin){
+ semaphore_wait(handle);
+ return true;
+ }
    #ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
- timespec tspec = ipcdetail::ptime_to_timespec(abs_time);
+ timespec tspec = ptime_to_timespec(abs_time);
    for (;;){
       int res = sem_timedwait(handle, &tspec);
       if(res == 0)
@@ -177,89 +195,17 @@
    return false;
    #else //#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
    boost::posix_time::ptime now;
- while((now = microsec_clock::universal_time()) < abs_time){
+ do{
       if(semaphore_try_wait(handle))
          return true;
       thread_yield();
- }
+ }while((now = microsec_clock::universal_time()) < abs_time);
    return false;
    #endif //#ifdef BOOST_INTERPROCESS_POSIX_TIMEOUTS
 }
 
-
-class named_semaphore_wrapper
-{
- named_semaphore_wrapper();
- named_semaphore_wrapper(const named_semaphore_wrapper&);
- named_semaphore_wrapper &operator= (const named_semaphore_wrapper &);
-
- public:
- named_semaphore_wrapper
- (ipcdetail::create_enum_t type, const char *name, unsigned int count, const permissions &perm = permissions())
- { semaphore_open(mp_sem, type, name, count, perm); }
-
- ~named_semaphore_wrapper()
- {
- if(mp_sem != BOOST_INTERPROCESS_POSIX_SEM_FAILED)
- semaphore_close(mp_sem);
- }
-
- void post()
- { semaphore_post(mp_sem); }
-
- void wait()
- { semaphore_wait(mp_sem); }
-
- bool try_wait()
- { return semaphore_try_wait(mp_sem); }
-
- bool timed_wait(const boost::posix_time::ptime &abs_time)
- { return semaphore_timed_wait(mp_sem, abs_time); }
-
- static bool remove(const char *name)
- { return semaphore_unlink(name); }
-
- private:
- friend class ipcdetail::interprocess_tester;
- void dont_close_on_destruction()
- { mp_sem = BOOST_INTERPROCESS_POSIX_SEM_FAILED; }
-
- sem_t *mp_sem;
-};
-
-class semaphore_wrapper
-{
- semaphore_wrapper();
- semaphore_wrapper(const semaphore_wrapper&);
- semaphore_wrapper &operator= (const semaphore_wrapper &);
-
- public:
- semaphore_wrapper(unsigned int initialCount)
- { semaphore_init(&m_sem, initialCount); }
-
- ~semaphore_wrapper()
- { semaphore_destroy(&m_sem); }
-
- void post()
- { semaphore_post(&m_sem); }
-
- void wait()
- { semaphore_wait(&m_sem); }
-
- bool try_wait()
- { return semaphore_try_wait(&m_sem); }
-
- bool timed_wait(const boost::posix_time::ptime &abs_time)
- { return semaphore_timed_wait(&m_sem, abs_time); }
-
- private:
- sem_t m_sem;
-};
-
 } //namespace ipcdetail {
 } //namespace interprocess {
 } //namespace boost {
 
-#undef BOOST_INTERPROCESS_POSIX_SEM_FAILED
-
 #endif //#ifndef BOOST_INTERPROCESS_POSIX_SEMAPHORE_WRAPPER_HPP

Modified: branches/release/boost/interprocess/sync/scoped_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/scoped_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/scoped_lock.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -27,7 +27,7 @@
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 
 //!\file
@@ -120,7 +120,7 @@
    //! to thisscoped_lock with no blocking. If the scop scoped_lock does not
    //! own the mutex, then neither will this scoped_lock. Only a moved
    //! scoped_lock's will match this signature. An non-moved scoped_lock
- //! can be moved with the expression: "boost::interprocess::move(lock);". This
+ //! can be moved with the expression: "boost::move(lock);". This
    //! constructor does not alter the state of the mutex, only potentially
    //! who owns it.
    scoped_lock(BOOST_RV_REF(scoped_lock) scop)
@@ -136,7 +136,7 @@
    //! unlocking upgr. If upgr is unlocked, then this scoped_lock will be
    //! unlocked as well. Only a moved upgradable_lock's will match this
    //! signature. An non-moved upgradable_lock can be moved with
- //! the expression: "boost::interprocess::move(lock);" This constructor may block if
+ //! the expression: "boost::move(lock);" This constructor may block if
    //! other threads hold a sharable_lock on this mutex (sharable_lock's can
    //! share ownership with an upgradable_lock).
    template<class T>

Modified: branches/release/boost/interprocess/sync/upgradable_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/upgradable_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/upgradable_lock.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2011. 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)
 //
@@ -28,7 +28,7 @@
 #include <boost/interprocess/detail/type_traits.hpp>
 
 #include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 
 //!\file
@@ -117,7 +117,7 @@
    //! while unlocking upgr. If upgr is unlocked, then this upgradable_lock will
    //! be unlocked as well. Only a moved upgradable_lock's will match this
    //! signature. An non-moved upgradable_lock can be moved with the
- //! expression: "boost::interprocess::move(lock);". This constructor does not alter the
+ //! expression: "boost::move(lock);". This constructor does not alter the
    //! state of the mutex, only potentially who owns it.
    upgradable_lock(BOOST_RV_REF(upgradable_lock<mutex_type>) upgr)
       : mp_mutex(0), m_locked(upgr.owns())
@@ -131,7 +131,7 @@
    //! to an upgradable-ownership of this upgradable_lock.
    //! Only a moved sharable_lock's will match this
    //! signature. An non-moved sharable_lock can be moved with the
- //! expression: "boost::interprocess::move(lock);".
+ //! expression: "boost::move(lock);".
    template<class T>
    upgradable_lock(BOOST_RV_REF(scoped_lock<T>) scop
                   , typename ipcdetail::enable_if< ipcdetail::is_same<T, UpgradableMutex> >::type * = 0)

Modified: branches/release/boost/interprocess/sync/xsi/xsi_named_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/xsi/xsi_named_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/xsi/xsi_named_mutex.hpp 2011-12-26 12:42:22 EST (Mon, 26 Dec 2011)
@@ -18,7 +18,7 @@
 #error "This header can't be used in Windows operating systems"
 #endif
 
-#include <boost/interprocess/detail/move.hpp>
+#include <boost/move/move.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
@@ -73,7 +73,7 @@
    //!Does not throw
    xsi_named_mutex &operator=(BOOST_RV_REF(xsi_named_mutex) moved)
    {
- xsi_named_mutex tmp(boost::interprocess::move(moved));
+ xsi_named_mutex tmp(boost::move(moved));
       this->swap(tmp);
       return *this;
    }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk